public static function requireParams(string ...$requiredParameters): array
    {
        if (KOLDY_CLI) {
            throw new ApplicationException('Unable to require parameters in CLI mode. Check \Koldy\Cli for that');
        }

        switch ($_SERVER['REQUEST_METHOD']) {
            default:
                $parameters = static::getInputVars();
                break;
            case 'GET':
                $parameters = $_GET;
                break;
            case 'POST':
                $parameters = $_POST;
                break;
        }

        $extractedParams = [];
        $missing = [];

        foreach ($requiredParameters as $param) {
            if (array_key_exists($param, $parameters)) {
                $extractedParams[$param] = $parameters[$param];
            } else {
                $missing[] = $param;
            }
        }

        if (count($missing) > 0) {
            $missingParameters = implode(', ', $missing);
            $passedParams = implode(', ', $requiredParameters);
            throw new BadRequestException("Missing {$_SERVER['REQUEST_METHOD']} parameter(s) '{$missingParameters}', only got " . (count($requiredParameters) > 0 ? $passedParams : '[nothing]'));
        }

        return $extractedParams;
    }