protected function getRequest()
    {
        if (empty($this->method) || empty($this->host)) {
            throw new \RuntimeException('Attempted to get unspecified Request');
        }

        return new Request(
            $this->method,
            $this->host . $this->resource,
            $this->headers,
            $this->body
        );
    }
protected function getRequest()
    {
        if (empty($this->method) || empty($this->host)) {
            throw new \RuntimeException('Attempted to get unspecified Request');
        }

        return new Request(
            $this->method,
            $this->host . $this->resource,
            $this->headers,
            $this->body
        );
    }
protected function getRequest ( ) { if ( empty ( $ this -> method ) || empty ( $ this -> host ) ) { throw new \ RuntimeException ( 'Attempted to get unspecified Request' ) ; } return new Request ( $ this -> method , $ this -> host . $ this -> resource , $ this -> headers , $ this -> body ) ; }
Prepare and get request.

@return \Psr\Http\Message\RequestInterface
Prepare and get request .