src/Client.php
public function buildUriWithQuery($uri, array $params = [])
    {
        $uri = uri_for($uri);

        if (!Uri::isAbsolute($uri)) {
            $uri = $uri->withScheme($this->baseURL->getScheme())
                ->withUserInfo($this->baseURL->getUserInfo())
                ->withHost($this->baseURL->getHost())
                ->withPort($this->baseURL->getPort());
        }

        $default = [
            'username' => $this->username,
            'password' => $this->password,
        ];

        return $uri->withQuery(build_query(array_merge($default, $params)));
    }
public function buildUriWithQuery($uri, array $params = [])
    {
        $uri = uri_for($uri);

        if (!Uri::isAbsolute($uri)) {
            $uri = $uri->withScheme($this->baseURL->getScheme())
                ->withUserInfo($this->baseURL->getUserInfo())
                ->withHost($this->baseURL->getHost())
                ->withPort($this->baseURL->getPort());
        }

        $default = [
            'username' => $this->username,
            'password' => $this->password,
        ];

        return $uri->withQuery(build_query(array_merge($default, $params)));
    }
public function buildUriWithQuery ( $ uri , array $ params = [ ] ) { $ uri = uri_for ( $ uri ) ; if ( ! Uri :: isAbsolute ( $ uri ) ) { $ uri = $ uri -> withScheme ( $ this -> baseURL -> getScheme ( ) ) -> withUserInfo ( $ this -> baseURL -> getUserInfo ( ) ) -> withHost ( $ this -> baseURL -> getHost ( ) ) -> withPort ( $ this -> baseURL -> getPort ( ) ) ; } $ default = [ 'username' => $ this -> username , 'password' => $ this -> password , ] ; return $ uri -> withQuery ( build_query ( array_merge ( $ default , $ params ) ) ) ; }
Return the uri with authentication parameters and query string

@param string|UriInterface $uri
@param array $params Query string parameters

@return UriInterface
Return the uri with authentication parameters and query string