Perform a HTTP GET request.

@param client
@param url
@param headers
@param urlParams
@return
@since 0.9.1.6
775752
public static RequestResponse callHttpGet(HttpJsonRpcClient client, String url,
            Map<String, Object> headers, Map<String, Object> urlParams) {
        return client.doGet(url, headers, urlParams);
    }
289486
public static HttpResponse executeGet(final String url,
                                          final Map<String, Object> parameters) {
        try {
            return executeGet(url, null, null, parameters);
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        }
        return null;
    }
654495
public static String get(String url,Map<String, String> queryParams,
            Map<String, String> headers) throws HttpException {
        try {
        	if(queryParams!=null && queryParams.size()>0){
        		for (Map.Entry<String, String> entry : queryParams.entrySet()) {
        			url=appendQueryParams(url, entry.getKey(), entry.getValue());
				}
        	}
            HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
            connection.setRequestMethod("GET");
            connection.setConnectTimeout(3000);
            connection.setDoInput(true);
            if (headers != null && !headers.isEmpty()) {
                for (Map.Entry<String, String> entry : headers.entrySet()) {
                    connection.setRequestProperty(entry.getKey(), entry.getValue());
                }
            }

            InputStream is = null;
            InputStreamReader isr = null;
            BufferedReader reader = null;
            try {
                int code = connection.getResponseCode();

                if (code >= HttpURLConnection.HTTP_BAD_REQUEST) {
                    is = connection.getErrorStream();
                    isr = new InputStreamReader(is, "UTF-8");
                    reader = new BufferedReader(isr);

                    StringBuilder sb = new StringBuilder();
                    do {
                        String line = reader.readLine();
                        if (line == null) {
                            break;
                        }
                        sb.append(line);
                    } while (true);

                    throw new HttpException(code,
                            "get request [" + url + "] error with response code [" + code + "] " +
                                    "\nerror message: " + sb.toString());
                }

                is = connection.getInputStream();
                isr = new InputStreamReader(is,"UTF-8");
                reader = new BufferedReader(isr);
                StringBuilder sb = new StringBuilder();
                do {
                    String line = reader.readLine();
                    if(null == line){
                        break;
                    }
                    sb.append(line);
                } while (true);
                return sb.toString();
            } finally {
                if(reader != null){
                    reader.close();
                }
                if(isr != null){
                    isr.close();
                }
                if (is != null) {
                    is.close();
                }
                connection.disconnect();
            }
        } catch (IOException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
454330
def http_get_request(url, params, add_to_headers=None, _async=False):
    
    headers = {
        'Content-type':
        'application/x-www-form-urlencoded',
        'User-Agent':
        'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36',
    }
    if add_to_headers:
        headers.update(add_to_headers)
    postdata = urllib.parse.urlencode(params)
    if _async:
        response = async_session.get(url, params=postdata, headers=headers, timeout=5)
        return response
    else:
        response = requests.get(url, postdata, headers=headers, timeout=5)
        try:
            if response.status_code == 200:
                return response.json()
            else:
                logger.debug(
                    f'<GET>error_code:{response.status_code}  reason:{response.reason} detail:{response.text}')
                return
        except BaseException as e:
            logger.exception(f'<GET>httpGet failed, detail is:{response.text},{e}')
            return
783053
public Request makeRequest(HttpMethod httpMethod, String urlPath) throws IOException
  {
    return makeRequest(httpMethod, urlPath, true);
  }
301631
public <T> HttpClientRequest.Builder<T> get(final URI uri, final HttpClientResponseHandler<T> httpHandler)
    {
        return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.GET, uri, httpHandler);
    }
1319846
def _get_request(self, url, headers, params=None):
        
        return self._session.get(url, headers=headers, params=params)
1184122
public RequestResponse doGet(String url, Map<String, Object> headers,
            Map<String, Object> urlParams) {
        RequestResponse requestResponse = initRequestResponse("GET", url, headers, urlParams, null);
        Request.Builder requestBuilder = buildRequest(url, headers, urlParams).get();
        return doCall(client, requestBuilder.build(), requestResponse);
    }
880554
protected void executeGetAsync(HttpCallback callback, String url, Object tag, StrParam... strParams) {
        Request.Builder builder = mBuilder.builderGet(url, strParams);
        async(builder, tag, callback);
    }
1297572
public XcapResponse get(URI uri, Header[] additionalRequestHeaders,
			Credentials credentials) throws IOException {

		if (log.isDebugEnabled()) {
			log.debug("get(uri=" + uri + " , additionalRequestHeaders = ( "
					+ Arrays.toString(additionalRequestHeaders) + " ) )");
		}

		return execute(new HttpGet(uri), additionalRequestHeaders, credentials);
	}
867024
public static String post(String url, Map<String, String> queryParas, byte[] data, Map<String, String> headers) {
		return HttpKit.post(url, queryParas, (new String(data)), headers);
	}
947787
def get(self, url, params=None, headers=None, content=None, form_content=None):
        # type: (str, Optional[Dict[str, str]], Optional[Dict[str, str]], Any, Optional[Dict[str, Any]]) -> ClientRequest
        
        request = self._request('GET', url, params, headers, content, form_content)
        request.method = 'GET'
        return request
279173
okhttp3.Response get(String url, Map<String, Object> params)
            throws RequestException, LocalOperationException {

        String fullUrl = getFullUrl(url);
        okhttp3.Request request = new okhttp3.Request.Builder()
                .url(addUrlParams(fullUrl, toPayload(params)))
                .addHeader("Transloadit-Client", version)
                .build();

        try {
            return httpClient.newCall(request).execute();
        } catch (IOException e) {
            throw new RequestException(e);
        }
    }
65408
def request(self, url, method="GET", params=None, headers=None):
        
        params = params or {}
        headers = headers or {}

        logger.debug("URL: %s", url)
        logger.debug("Method: %s", method)
        logger.debug("Headers: %s", headers)
        logger.debug("Params: %s", params)
        
        response, content = self.client().request(url, method, headers=headers,
            body=urllib.urlencode(params))
        
        content = smart_unicode(content)

        logger.debug("Status: %s", response['status'])
        logger.debug("Content: %s", content)
        
        if response['status'] != '200':
            raise OAuthError(_(
                u"Invalid status code %s while requesting %s: %s") % (
                    response['status'], url, content))
        
        return content
802376
protected InputStream getStream(HttpClient httpClient, String url) {
        try {
            HttpEntity entity = get(httpClient, url);
            if (entity == null) return null;
            return entity.getContent();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
676812
public static RequestResponse callHttpPatch(HttpJsonRpcClient client, String url,
            Map<String, Object> headers, Map<String, Object> urlParams, Object requestData) {
        return client.doPatch(url, headers, urlParams, requestData);
    }
4440
protected Response performRequest(String url,
			Map<String, String> additionalHeaders) throws IOException {
		if (accessToken == null) {
			throw new UnauthorizedException("Access token has not yet been requested");
		}
		URL u = new URL(url);
		return auth.request(u, Method.GET, accessToken, additionalHeaders);
	}