Performs HTTP GET request

@param string $url Target URL
@param array $data Data to be sent
@param array $extra Extra options
@return mixed
541201
public function get($url, array $data = array(), array $extra = array())
    {
        if (!empty($data)) {
            $url = $url . '?' . http_build_query($data);
        }

		$curl = new Curl(array(
            CURLOPT_URL => $url,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_HEADER => false
        ), $extra);

        return $curl->exec();
    }
173991
public function get($url, array $data = [], array $headers = [], $cacheMinutes = 30)
    {
        return $this->send('get', $url, $data, $headers, $cacheMinutes);
    }
1103444
static public function httpPost($url, $data)
    {
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_HEADER, false);
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, self::_buildPost($data));
        list($content, $status) = array(curl_exec($curl), curl_getinfo($curl), curl_close($curl));
        return (intval($status["http_code"]) === 200) ? $content : false;
    }
650470
public static function api(string $url, array $data = []): array
    {
        $store = null;
        $url = str_replace("&amp;", "&", urldecode(trim($url)));
        $cookie = tempnam("/tmp", "CURLCOOKIE");
        try {
            $ch = curl_init($url);
            curl_setopt_array($ch, array(
                CURLOPT_POST => TRUE,
                CURLOPT_RETURNTRANSFER => TRUE,
                CURLOPT_HTTPHEADER => array(
                    'Content-Type: application/json'
                ),
                CURLOPT_POSTFIELDS => $cookie,
                CURLOPT_POSTFIELDS => json_encode($data)
            ));
            $store = curl_exec($ch);

            if ($store === false)
                return ['response' => 2, 'error' => curl_error($ch), 'data' => ''];

            curl_close($ch);

            return ['response' => 1, 'error' => '', 'data' => json_decode($store, true)];
        } catch (\Exception $e) {
            return ['response' => 2, 'error' => 'requisição falhou', 'data' => ''];
        }
    }
557524
public function options($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }
        $this->setURL($url, $data);
        $this->unsetHeader('Content-Length');
        $this->setOpt(CURLOPT_CUSTOMREQUEST, 'OPTIONS');
        return $this->exec();
    }
781218
public function put($url, $data = [], array $options = [])
    {
        $options = $this->_mergeOptions($options);
        $url = $this->buildUrl($url, [], $options);

        return $this->_doRequest(Request::METHOD_PUT, $url, $data, $options);
    }
703298
private function _request($urn, array $data = [])
    {
        list($method, $url) = $this->_authLink($urn, $data);
        list($code, $json) = Http::basicRequest($method, $url, $this->_clientAuth, $data);
        return $json;
    }
669504
public function success($msg = null, $data = null, $extraData = [])
    {
        $return = $this->output(1, $msg, $data, $extraData);

        return $this->responseJson($return);
    }
1233984
public static function get($url, $query_data = null, array $headers = array(), array $options = array())
    {
        return self::request('GET', $url, $query_data, null, $headers, $options);
    }
736629
public function returnSuccess($message = '操作成功', $url = '', $extra = [])
    {
        if (! empty($this->redirectRoute)) {
            $url = Url::toRoute([
                $this->redirectRoute,
                'msg' => $message,
                'url' => $url,
                $extra
            ]);
        }
        $this->redirect($url);
    }
729364
public function post($url, $data = array())
    {
        $this->setOpt(CURLOPT_URL, $url);
        $this->preparePayload($data);
        $this->exec();
        return $this;
    }
606351
public function request($url)
    {
        try {
            $resp = $this->guzzle->get($url);
            return (string) $resp->getBody();
        } catch (RequestException $e) {
            $response = $e->getResponse();
            throw new HttpException($response ? $response->getBody() : null, $e->getMessage(), $e->getCode(), $e);
        } catch (TransferException $e) {
            throw new HttpException('', $e->getMessage(), $e->getCode(), $e);
        }
    }
707442
public function addGet($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }
        $curl = new Curl();
        $curl->setURL($url, $data);
        $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
        $curl->setOpt(CURLOPT_HTTPGET, true);
        $this->addHandle($curl);
        return $curl;
    }
896631
public function post($url, $data = [], array $options = [])
    {
        $options = $this->_mergeOptions($options);
        $url = $this->buildUrl($url, [], $options);

        return $this->_doRequest(Request::METHOD_POST, $url, $data, $options);
    }
388874
public function httpPosRequest($url, $data)
    {
        $enc = EncryptAes::encrypt($data);
        $dataEncrypt = 'data='.$enc;
        $dataEncrypt = str_replace('+', '%2B', $dataEncrypt);
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_HEADER, 0);
        curl_setopt($curl, CURLOPT_POST, count($dataEncrypt));
        curl_setopt($curl, CURLOPT_POSTFIELDS, $dataEncrypt);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_FAILONERROR, true);
        curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_URL, $url);
        $response = curl_exec($curl);

        $resolve = $this->curlResponse->resolve($curl, $response);

        curl_close($curl);

        return $resolve;
    }
646473
public function get($uri, $extraHeaders = array())
    {
        $requestData = $this->prepareRequest('GET', $uri, $extraHeaders);
        return $this->performHttpRequest(
            $requestData['method'], $requestData['url'],
            $requestData['headers']);
    }
1245175
function post($url, $data, $callback = null)
    {
        $ret = new CoURLResult($url, $callback, $this->handle);
        $ret->method = self::METHOD_POST;
        $ret->data = $data;
        $this->requests[$ret->id] = $ret;
        return $ret;
    }