public function getRequest($name)
    {
        if ($this->callerNotSelfOrPathsProxy()) {
            Deprecated::method(3.3, 'Use Request object in request cycle instead.');
        }

        if (!$this->requestInitialized && in_array($name, ['canonical', 'protocol', 'hostname'])) {
            $this->initializeRequest($this->app, $this->requestObject);
        }

        if (! array_key_exists($name, $this->request)) {
            throw new \InvalidArgumentException("Request component $name is not available", 1);
        }

        return $this->request[$name];
    }