Add GET data for resource
@param string $url resource url
@param array $data GET parameters
@return string query string
326430
private function addGetData($url, $data) {
        $parts[] = $url;
        if (!empty($data)) {
            $parts[] = http_build_query($data);
        }
        return implode('?', $parts);
    }
173991
public function get($url, array $data = [], array $headers = [], $cacheMinutes = 30)
    {
        return $this->send('get', $url, $data, $headers, $cacheMinutes);
    }
477548
public function putJson(String $url = NULL, $data = NULL)
    {
        return $this->_customRequest($url, json_encode($this->data ?? $data), 'put');
    }
468389
static public function postArray($url, $data, $options=null)
    {
        $instance = new static('POST', $url, $data, $options);
        return $instance->toArray();
    }
772015
public static function postRequest($url, $data)
    {
        $url = str_replace("&amp;", "&", urldecode(trim($url)));

        $options = array('http' => array('header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data)));
        $context = stream_context_create($options);

        try {
            $data = @file_get_contents($url, false, $context);
            return $data;
        } catch (\Exception $e) {
            return false;
        }
    }
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);
    }
1362596
public function get($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }
        $this->setUrl($url, $data);
        $this->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
        $this->setOpt(CURLOPT_HTTPGET, true);
        return $this->exec();
    }
1318729
public function get($url, array $data = [], array $headers = [], $cacheMinutes = 0, HttpExceptionHandler $handler = null)
    {
        return $this->send('get', $url, $data, $headers, $cacheMinutes, $handler);
    }
115809
public function get($url, $data = null)
    {
        $cache_key = $this->get_key($url, $data);

        if ($json = $this->get_cache($cache_key, 'result')) {
            $result = json_decode($json, true);

            // Ensure cache_key exists in index
            $this->get_index();

            if (isset($result['$collection'])) {
                $collection = $result['$collection'];
                if (isset($this->indexes[$collection][$cache_key])) {
                    return $result;
                }
            }

            // Not found in proper index, then clear?
            foreach ($this->result_collections($result) as $collection) {
                $this->clear_indexes(array("{$collection}" => $cache_key));
            }
        }

        return null;
    }
1269138
private function createHttpGetRequest($url, array $params = [])
    {
        $url .= (count($params) > 0 ? '?' . http_build_query($params, null, '&', PHP_QUERY_RFC3986) : '');

        return new Request('GET', $url);
    }
1156953
public static function post($url, array $data)
    {
        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL,            TotalVoice::$api . $url);
        curl_setopt($ch, CURLOPT_POST,           1);
        curl_setopt($ch, CURLOPT_POSTFIELDS,     http_build_query($data));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER,     ['Access-Token: ' . TotalVoice::$token]);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

        $output = curl_exec($ch);
        $info = curl_getinfo($ch);
        curl_close($ch);

        $response = new HttpResponse();
        $response->setStatusCode((int)$info['http_code']);
        $response->setContentType($info['content_type']);
        $response->setContent(json_decode($output));
        return $response;
    }
1200530
public static function curlHeaders($url, &$data)
    {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_NOBODY, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HEADER, true);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
        $data = curl_exec($ch);
        $headers = curl_getinfo($ch);
        curl_close($ch);

        return $headers;
    }
120736
public function http_get($url, $data_type='json') {
        
        $cl = curl_init();
        if(stripos($url, 'https://') !== FALSE) {
            curl_setopt($cl, CURLOPT_SSL_VERIFYPEER, FALSE);
            curl_setopt($cl, CURLOPT_SSL_VERIFYHOST, FALSE);
            curl_setopt($cl, CURLOPT_SSLVERSION, 1);
        }
        curl_setopt($cl, CURLOPT_URL, $url);
        curl_setopt($cl, CURLOPT_RETURNTRANSFER, 1 );
        $content = curl_exec($cl);
        $status = curl_getinfo($cl);
        curl_close($cl);
        if (isset($status['http_code']) && $status['http_code'] == 200) {
            if ($data_type == 'json') {
                $content = json_decode($content , true);
            }
            return $content;
        } else {
            return FALSE;
        }
    }
122146
protected function apiPost($url, $data)
    {
        if (empty($data['client_ip'])) {
            $data['client_ip'] = sprintf("%d.%d.%d.%d", rand(1, 244), rand(1, 244), rand(1, 244), rand(1, 244));
        }

        $response = $this->apiClient->post($url, array(
            'body' => $data,
        ));

        return $this->processResponse($response);
    }
667606
protected function addQueryStrings(array $url) {
		if (!isset($url['?'])) {
			$url['?'] = [];
		}
		$url['?'] += $this->_View->getRequest()->getQuery();

		return $url;
	}
685044
public function put($url, $data = '$undefined')
    {
        if ($data === '$undefined') {
            $data = ($url instanceof Resource)
                ? $url->data()
                : null;
        }
        return $this->request('put', $url, $data);
    }
1169218
public function get($url, $data = array(), $dataType = null)
    {
        return $this->processMethod($url, $data, $dataType, 'GET');
    }