Perform a GET request
@param string $url
@param array $params
@param callable $resultcb
@call  ( url $url, array $params )
@call  ( url $url, callable $resultcb )
@callback $resultcb ( Connection $conn, boolean $success )
484861
public function get($url, $params)
    {
        if (is_callable($params)) {
            $params = ['resultcb' => $params];
        }
        if (!isset($params['uri']) || !isset($params['host'])) {
            list($params['scheme'], $params['host'], $params['uri'], $params['port']) = static::parseUrl($url);
        }
        if (isset($params['connect'])) {
            $dest = $params['connect'];
        } elseif (isset($params['proxy']) && $params['proxy']) {
            if ($params['proxy']['type'] === 'http') {
                $dest = 'tcp://' . $params['proxy']['addr'];
            }
        } else {
            $dest = 'tcp://' . $params['host'] . (isset($params['port']) ? ':' . $params['port'] : null) . ($params['scheme'] === 'https' ? '#ssl' : '');
        }
        $this->getConnection($dest, function ($conn) use ($url, $params) {
            if (!$conn->isConnected()) {
                $params['resultcb'](false);
                return;
            }
            $conn->get($url, $params);
        });
    }
1331121
public function post($url, $params = null) {
    $this->params = $params;
    $this->method = 'POST';
    $this->url = $url;

    return $this->request();
  }
1280721
protected function send($url, array $params)
    {
        $success = false;

        $rawResponse = $this->client->get($url.'?'.http_build_query($params), [
            'exceptions'      => false,
            'timeout'         => '80',
            'connect_timeout' => '30',
            'headers'         => [
                'Accept'       => 'application/xml',
                'Content-Type' => 'application/x-www-form-urlencoded',
            ],
        ]);

        if ($rawResponse->getStatusCode() == 200) {
            $success = false;
            $response = $this->parse($rawResponse->getBody());

            if (isset($response->error)) {
                $response = $this->responseError($rawResponse);
            } else {
                $success = $response->response->attributes()->type == 'status';
            }
        } else {
            $response = $this->responseError($rawResponse);
        }

        return $this->mapResponse($success, $response);
    }
962845
public function post($url, array $params)
    {
        $request = new Request(
            $url,
            'POST',
            'php://temp',
            ['content-type' => 'application/json']
        );

        $request->getBody()->write(json_encode($params));
        return $this->send($request);
    }
715430
protected function post($url, $params, $parse = true){
		$curl = curl_init();
		curl_setopt($curl, CURLOPT_URL, $url);
		curl_setopt($curl, CURLOPT_POST, 1);
//		curl_setopt($curl, CURLOPT_POSTFIELDS, urldecode(http_build_query($params)));
//		curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
		curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
		$result = curl_exec($curl);
		curl_close($curl);
		if($parse){
			$result = json_decode($result, true);
			}
		return $result;
		}
57891
public function get($url, $params = [])
    {
        if (is_array($url)) {
            return $this->mget($url, $params);
        }
        return $this->exec($this->buildRequest('GET', $url, $params));
    }
1282291
public function get($url, $params = array())
    {
        $client = new \Guzzle\Http\Client($this->_url);
        $request = $client->get($url, array(), array(
            'query' => $params
        ));
        $request->getCurlOptions()->set(CURLOPT_SSLVERSION, 1); // CURL_SSLVERSION_TLSv1
        $response = $client->send($request);
        if ($response->isSuccessful()) {
            return $response->json();
        } else {
            throw new \Exception("云片短信服务器未有效的响应请求");
        }
    }
248875
public function call($url, $method = 'GET', $params = [])
    {
        // Set call parameters
        $params = array_merge($this->params, is_array($params)? $params : []);

        // Setup parameters
        $content = '';
        $queryString = http_build_query($params);
        if ($method === 'GET') {
            $url = $url . '?' . $queryString;
        } else {
            $content = $queryString;
        }

        // Make call
        $result = @file_get_contents($url, false, stream_context_create([
            'http' => [
                'method'  => $method,
                'header'  => 'Content-type: application/x-www-form-urlencoded',
                'content' => $content
            ]
        ]));

        // Return result
        return $result;
    }
843519
private function initiateGet($url, $params)
    {;
        if (!empty($params))
        {
            $parameter=implode(array_values($params));
            $url .= '/'.$parameter;
        }
        $ch = curl_init($this->host.'/'.$url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authentication: Token ". $this->token));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

        return $ch;
    }
767298
public function fetch($url, array $params = array())
    {
        $params = array_merge(array(
            'curl' => array(),
            'fopen' => array(),
        ), $params);

        if (function_exists('curl_init') && $this->config['prefer_curl']) {
            return $this->curl($url, $params['curl']);
        }

        return $this->fileGetContents($url, $params['fopen']);
    }
1146157
public function request($url, array $params = array())
    {
        $uri = $this->makeUri($url, $params);

        return new Psr7\Request('get', $uri);
    }
682702
public function request($method, $url, array $params = [])
    {
        if (!$this->authenticated()) {
            $this->authenticate();
        }

        if (!isset($params['query'])) {
            $params['query'] = [];
        }

        $params['query']['format'] = 'json';

        try {
            $response = $this->getHttpClient()->request($method, $url, $params);
        } catch (RequestException $e) {
            return $e->getResponse();
        }

        return $response;
    }
564457
private function get($url, Array $params = []) {
        $this->processor->get($url, $params);
        return $this->handleResponse();
    }
1300472
public function request( $method, $url, $params=null )
    {
        if( $params === null )
            $params = array();

        list( $rbody, $rcode ) = $this->requestRaw( $method, $url, $params );

        $resp = $this->interpretResponse( $rbody, $rcode, $method );

        return $resp['data'];
    }
595368
public function get($url, $params = array())
    {
        $request = $this->provider->request($url, $params);
        $response = $this->client->send($request);

        $data = $response->getBody()->getContents();
        $format = $this->getFormat($params, $response);

        return $this->serializer->deserialize($data, null, $format);
    }
775559
public function get( $uri, array $params = array() )
    {
        $this->_client->setMethod('GET');
        return $this->_request($uri, $params);
    }
285457
public function getJson($url, $params = [])
    {
        $req = $this->buildRequest('GET', $url, $params);
        $req->setHeader('accept', 'application/json');
        $res = $this->exec($req);
        return $res === false ? false : $res->getJson();
    }