Java Code Examples for org.asynchttpclient.Request#getUrl()
The following examples show how to use
org.asynchttpclient.Request#getUrl() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AsyncHttpClientAspect2x.java From glowroot with Apache License 2.0 | 6 votes |
@OnBefore public static @Nullable AsyncTraceEntry onBefore(ThreadContext context, @BindParameter @Nullable Request request) { // need to start trace entry @OnBefore in case it is executed in a "same thread // executor" in which case will be over in @OnReturn if (request == null) { return null; } String method = request.getMethod(); if (method == null) { method = ""; } else { method += " "; } String url = request.getUrl(); if (url == null) { url = ""; } return context.startAsyncServiceCallEntry("HTTP", method + Uris.stripQueryString(url), MessageSupplier.create("http client request: {}{}", method, url), timerName); }
Example 2
Source File: ClickHouseClient.java From clickhouse-client-java with Apache License 2.0 | 5 votes |
private static String decodedUrl(Request request) { final String url = request.getUrl(); try { return URLDecoder.decode(url, StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { return url; } }
Example 3
Source File: AzureSharedKeyAuthTokenProvider.java From dremio-oss with Apache License 2.0 | 5 votes |
@Override public String getAuthzHeaderValue(final Request req) { try { final URL url = new URL(req.getUrl()); final Map<String, String> headersMap = new HashMap<>(); req.getHeaders().forEach(header -> headersMap.put(header.getKey(), header.getValue())); return this.storageSharedKeyCredential.generateAuthorizationHeader(url, req.getMethod(), headersMap); } catch (MalformedURLException e) { throw new IllegalStateException("The request URL is invalid ", e); } }
Example 4
Source File: NingAsyncHttpClientRequestAdaptorV2.java From pinpoint with Apache License 2.0 | 4 votes |
@Override public String getUrl(final Request httpRequest) { return httpRequest.getUrl(); }