
<?php

class Request
{

    public static function post()
    {

        ApiAuth::validateApiKey();

        if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
            Response::error("Invalid request method",405);
        }

        return $_POST;

    }



    public static function get()
    {

        ApiAuth::validateApiKey();

        if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
            Response::error("Invalid request method",405);
        }

        return $_GET;

    }

}