public final class HttpCacheSupport extends Object
Constructor and Description |
---|
HttpCacheSupport() |
Modifier and Type | Method and Description |
---|---|
static String |
getRequestUri(org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.HttpHost target)
Returns text representation of the request URI of the given
HttpRequest . |
static URI |
normalize(URI requestUri)
Returns normalized representation of the request URI optimized for use as a cache key.
|
static URI |
normalizeQuetly(String requestUri)
Deprecated.
|
static URI |
normalizeQuietly(String requestUri)
Lenient URI parser that normalizes valid
URI s and returns null for malformed URIs. |
public static String getRequestUri(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpHost target)
HttpRequest
.
This method will use HttpRequest.getPath()
, HttpRequest.getScheme()
and
HttpRequest.getAuthority()
values when available or attributes of target
HttpHost
in order to construct an absolute URI.
This method will not attempt to ensure validity of the resultant text representation.
request
- the HttpRequest
target
- target hostpublic static URI normalize(URI requestUri) throws URISyntaxException
requestUri
- original request URIURISyntaxException
@Deprecated public static URI normalizeQuetly(String requestUri)
normalizeQuietly(String)
URI
s and returns null
for malformed URIs.Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.