Send a GET request with query params.

@param string $path
@param array  $params
@param array  $headers

@throws \Http\Client\Exception

@return array
767639
protected function get(string $path, array $params = [], array $headers = [])
    {
        $response = $this->pureGet($path, $params, $headers);

        return ResponseMediator::getContent($response);
    }
1222779
protected function put($path, array $parameters = array(), $requestHeaders = array())
    {
        foreach ($parameters as $name => $parameter) {
            if (is_bool($parameter)) {
                $parameters[$name] = $parameter ? 'true' : 'false';
            }
        }

        $response = $this->client->getHttpClient()->put(
            $path,
            $this->createParametersBody($parameters),
            $requestHeaders
        );

        return ResponseMediator::getContent($response);
    }
198699
function get($path, $query = null, $headers = null, $curlOpts = null) {
        $payload = $this -> encodePostBody($query);
        
        if ($payload !== "") {
            if (strpos($path, '?')) {
                $url = $path . "&" . $payload;
            } else {
                $url = $path . "?" . $payload;
            }
        }else{
            $url = $path;
        }
        
        return $this -> request($url, self::HTTP_GET, '', $headers, $curlOpts);
    }
75610
protected function get($path, array $parameters = [], array $requestHeaders = [])
    {
        $path = $this->preparePath($path, $parameters);

        try {
            $response = $this->client->getHttpClient()->get($path, $requestHeaders);

            return ResponseFormatter::getContent($response);
        } catch (HttpException $e) {
            (new ApiExceptionHandler($e))->handle();
        }
    }
507472
def list(path, params = {}, headers = {})
      params = params.merge(list: true)
      request(:get, path, params, headers)
    end
837638
def get(path, params = {}, header = {})
      _send(Net::HTTP::Get.new(expand_path(path, params), expand_header(header)))
    end
55479
public function getByPath($path, $headers = [])
    {
        $response = $this->httpRequest($path, Requests::GET, null, $headers);

        if (is_array($response)) {
            $response = (object) $response;
        }

        return $this->populate($response);
    }
522091
public function request(string $path, array $params = null, string $method = null, $body = null, array $headers = null):ResponseInterface{
		$method = $method ?? 'GET';
		$params = $this->requestParams($path, $params ?? [], $body ?? []);

		if($method === 'POST'){
			$body   = $params;
			$params = [];
		}

#		return parent::request('', $params, $method, $body, $headers);

		$request = $this->requestFactory
			->createRequest($method, Psr7\merge_query($this->apiURL, $params));

		foreach(array_merge($this->apiHeaders, $headers ?? []) as $header => $value){
			$request = $request->withAddedHeader($header, $value);
		}

		if($method === 'POST'){
			$request = $request->withHeader('Content-Type', 'application/x-www-form-urlencoded');
			$body    = $this->streamFactory->createStream(http_build_query($body, '', '&', PHP_QUERY_RFC1738));
			$request = $request->withBody($body);
		}

		return $this->http->sendRequest($request);
	}
375371
protected function httpPut(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface
    {
        try {
            $response = $this->httpClient->sendRequest(
                $this->requestBuilder->create('PUT', $path, $requestHeaders, $this->createRequestBody($parameters))
            );
        } catch (Psr18\NetworkExceptionInterface $e) {
            throw HttpServerException::networkError($e);
        }

        return $response;
    }
715752
public function request($path, array $params = [])
	{
		if ( ! $this->guzzle instanceof Guzzle)
		{
			throw new BaseUrlException('BaseUrl was never set. Please call baseUrl($url).');
		}

		$uri      = $path.'?'.http_build_query($params);
		$response = $this->guzzle
			->get($uri, ['timeout'     => $this->timeout,
						 'http_errors' => false]);
		$body     = $response->getBody();
		$code     = $response->getStatusCode();
		$headers  = $response->getHeaders();
		if ($body instanceof Stream)
		{
			$body->seek(0);
			$content = ($body->getSize() > 0) ? $body->read($body->getSize()) : null;
		}
		else
		{
			// no content
			$content = '';
		}
		$response = new Response($content, $code, $headers);

		return $response;
	}
27226
public function get($path, $params = array(), $vars = array()) {
    $request = $this->request();
    $request = $this->prepareRequest($request);

    $response = $request->get($this->endpoint . $path, $params, $vars);
    return $this->handleResponse($response);
  }
2434
public static function get($url, $headers = [], $parameters = null)
    {
        return Request::create('default')->get($url, $headers, $parameters);
    }
1322524
public function get($path, $query = [])
    {
        // Add query parameters to $path?
        if (!empty($query)) {
            if (strpos($path, '?') === false) {
                $path .= '?'.http_build_query($query, '', '&');
            } else {
                $path .= ini_get('arg_separator.output').http_build_query($query, '', '&');
            }
        }

        // Start the request and return the response
        return $this->execute('GET', $path);
    }
993676
public function get($url, array $params = [], array $headers = [])
    {
        $url = $this->formatUrl($url, $url !== 'current/Me', $url == $this->nextUrl);

        try {
            $request = $this->createRequest('GET', $url, null, $params, $headers);
            $response = $this->client()->send($request);

            return $this->parseResponse($response, $url != $this->nextUrl);
        } catch (Exception $e) {
            $this->parseExceptionForErrorMessages($e);
        }
    }
1178958
public function post($path, $params)
    {
        $idempotencyKey = uniqid("", true);
        $paramsWithHeaders = array("headers" => array("Idempotency-Key" => $idempotencyKey));
        $params = array_replace_recursive($paramsWithHeaders, $params);

        $response = $this->http_client->request('POST', $path, $params);

        $this->handleErrors($response);
        return $response;
    }
151112
public function get($path, $params = [])
    {
        return $this->ttools->makeRequest(
            TTools::API_BASE . '/' . TTools::API_VERSION . $path,
            $params,
            'GET',
            false
        );
    }
163253
public function request($path, array $parameters = array(), $httpMethod = 'GET', array $headers = array())
    {
        $client = $this->getHttpClient($path);
        $request = $client->getRequest();
        $client->setMethod($httpMethod);
        $client->setHeaders($headers);

        if ($httpMethod == 'GET') {
            $query = $request->getQuery();
            foreach ($parameters as $key => $value) {
                $query->set($key, $value);
            }
        } elseif ($httpMethod == 'POST') {
            $request->setContent(json_encode($parameters));
        }

        //Trigger Pre Send Event to modify Request Object
        $this->getEventManager()->trigger('pre.send', $request);

        $response = $client->dispatch($request);
        $this->response = $response;

        //Trigger Post Send to Modify/Validate Response object
        $result = $this->getEventManager()->trigger('post.send', $response);
        if ($result->stopped()) {
            $response = $result->last();
        }

        $this->request = $request;

        return $response;
    }