public function get($url, array $params = [], $timeout = null,
        array $headers = []
    ) {
        if ($params) {
            $query = $this->createQueryString($params);
            if (strpos($url, '?') !== false) {
                $url .= '&' . $query;
            } else {
                $url .= '?' . $query;
            }
        }
        $client
            = $this->createClient($url, \Zend\Http\Request::METHOD_GET, $timeout);
        if ($headers) {
            $client->setHeaders($headers);
        }
        return $this->send($client);
    }
public function get($url, array $params = [], $timeout = null,
        array $headers = []
    ) {
        if ($params) {
            $query = $this->createQueryString($params);
            if (strpos($url, '?') !== false) {
                $url .= '&' . $query;
            } else {
                $url .= '?' . $query;
            }
        }
        $client
            = $this->createClient($url, \Zend\Http\Request::METHOD_GET, $timeout);
        if ($headers) {
            $client->setHeaders($headers);
        }
        return $this->send($client);
    }
public function get ( $ url , array $ params = [ ] , $ timeout = null , array $ headers = [ ] ) { if ( $ params ) { $ query = $ this -> createQueryString ( $ params ) ; if ( strpos ( $ url , '?' ) !== false ) { $ url .= '&' . $ query ; } else { $ url .= '?' . $ query ; } } $ client = $ this -> createClient ( $ url , \ Zend \ Http \ Request :: METHOD_GET , $ timeout ) ; if ( $ headers ) { $ client -> setHeaders ( $ headers ) ; } return $ this -> send ( $ client ) ; }
Perform a GET request.

@param string $url     Request URL
@param array  $params  Request parameters
@param float  $timeout Request timeout in seconds
@param array  $headers Request headers

@return \Zend\Http\Response
Perform a GET request .