public function getInput(string $name, $default = null)
    {
        if ($this->isJson()) {
            $json = $this->getJsonBody();

            if (array_key_exists($name, $json)) {
                return $json[$name];
            } else {
                return $default;
            }
        } else {
            $value = null;

            switch ($this->method) {
                case RequestMethods::GET:
                    return $this->query->get($name, $default);
                case RequestMethods::POST:
                    $value = $this->post->get($name, $default);
                    break;
                case RequestMethods::DELETE:
                    $value = $this->delete->get($name, $default);
                    break;
                case RequestMethods::PUT:
                    $value = $this->put->get($name, $default);
                    break;
                case RequestMethods::PATCH:
                    $value = $this->patch->get($name, $default);
                    break;
            }

            if ($value === null) {
                // Try falling back to query
                $value = $this->query->get($name, $default);
            }

            return $value;
        }
    }