protected function createRequest($verb, $uri, $parameters)
    {
        $parameters = \array_merge($this->parameters, (array) $parameters);

        $uri = $this->addPrefixToUri($uri);

        // If the URI does not have a scheme then we can assume that there it is not an
        // absolute URI, in this case we'll prefix the root requests path to the URI.
        $rootUrl = $this->getRootRequest()->root();

        if ((! \parse_url($uri, PHP_URL_SCHEME)) && \parse_url($rootUrl) !== false) {
            $uri = \rtrim($rootUrl, '/').'/'.ltrim($uri, '/');
        }

        $request = InternalRequest::create(
            $uri,
            $verb,
            $parameters,
            $this->cookies,
            $this->uploads,
            $this->container['request']->server->all(),
            $this->content
        );

        $request->headers->set('host', $this->getDomain());

        foreach ($this->headers as $header => $value) {
            $request->headers->set($header, $value);
        }

        $request->headers->set('accept', $this->getAcceptHeader());

        return $request;
    }