src/Application/HttpClient/HttpService.php
protected function createQueryRequest(
        string $method,
        $uri,
        array $parameters = [],
        array $headers = [],
        string $protocol = '1.1'
    ): RequestInterface {
        $uri = $this->createUri($uri);

        if (!empty($parameters)) {
            $queryString = http_build_query($parameters);
            if ($uri->getQuery() === '') {
                $uri = $uri->withQuery($queryString);
            } else {
                $uri = $uri->withQuery($uri->getQuery().'&'.$queryString);
            }
        }

        return $this->createRequest($method, $uri, $headers, null, $protocol);
    }
protected function createQueryRequest(
        string $method,
        $uri,
        array $parameters = [],
        array $headers = [],
        string $protocol = '1.1'
    ): RequestInterface {
        $uri = $this->createUri($uri);

        if (!empty($parameters)) {
            $queryString = http_build_query($parameters);
            if ($uri->getQuery() === '') {
                $uri = $uri->withQuery($queryString);
            } else {
                $uri = $uri->withQuery($uri->getQuery().'&'.$queryString);
            }
        }

        return $this->createRequest($method, $uri, $headers, null, $protocol);
    }
protected function createQueryRequest ( string $ method , $ uri , array $ parameters = [ ] , array $ headers = [ ] , string $ protocol = '1.1' ) : RequestInterface { $ uri = $ this -> createUri ( $ uri ) ; if ( ! empty ( $ parameters ) ) { $ queryString = http_build_query ( $ parameters ) ; if ( $ uri -> getQuery ( ) === '' ) { $ uri = $ uri -> withQuery ( $ queryString ) ; } else { $ uri = $ uri -> withQuery ( $ uri -> getQuery ( ) . '&' . $ queryString ) ; } } return $ this -> createRequest ( $ method , $ uri , $ headers , null , $ protocol ) ; }
Creates a query request

@param string              $method     Request method
@param string|UriInterface $uri        Request URI
@param array               $parameters Query parameters
@param array               $headers    Request headers
@param string              $protocol   Protocol version

@return RequestInterface
Creates a query request