protected function buildRequest($method, $url, $params = [])
    {
        if (count($params) > 0) {
            $url .= strpos($url, '?') === false ? '?' : '&';
            $url .= http_build_query($params);
        }
        return new Request($url, $method);
    }
protected function buildRequest($method, $url, $params = [])
    {
        if (count($params) > 0) {
            $url .= strpos($url, '?') === false ? '?' : '&';
            $url .= http_build_query($params);
        }
        return new Request($url, $method);
    }
protected function buildRequest ( $ method , $ url , $ params = [ ] ) { if ( count ( $ params ) > 0 ) { $ url .= strpos ( $ url , '?' ) === false ? '?' : '&' ; $ url .= http_build_query ( $ params ) ; } return new Request ( $ url , $ method ) ; }
Build a http request
@param string $method
@param string $url
@param array $params
@return Request
Build a http request