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;
    }
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;
    }
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 ; }
Create a new internal request from an HTTP verb and URI.

@param string       $verb
@param string       $uri
@param string|array $parameters

@return \Dingo\Api\Http\InternalRequest
Create a new internal request from an HTTP verb and URI .