Modifier and Type | Method and Description |
---|---|
static URI |
create(org.apache.hc.core5.http.HttpHost host,
String path)
Deprecated.
Use
URIBuilder . |
static URI |
create(String scheme,
org.apache.hc.core5.net.URIAuthority host,
String path)
Deprecated.
Use
URIBuilder . |
static org.apache.hc.core5.http.HttpHost |
extractHost(URI uri)
Extracts target host from the given
URI . |
static URI |
resolve(URI originalURI,
org.apache.hc.core5.http.HttpHost target,
List<URI> redirects)
Derives the interpreted (absolute) URI that was used to generate the last
request.
|
static URI |
resolve(URI baseURI,
String reference)
Resolves a URI reference against a base URI.
|
static URI |
resolve(URI baseURI,
URI reference)
Resolves a URI reference against a base URI.
|
static URI |
rewriteURI(URI uri)
Deprecated.
Use
URIBuilder . |
static URI |
rewriteURI(URI uri,
org.apache.hc.core5.http.HttpHost target)
Deprecated.
Use
URIBuilder . |
static URI |
rewriteURI(URI uri,
org.apache.hc.core5.http.HttpHost target,
boolean dropFragment)
Deprecated.
Use
URIBuilder . |
@Deprecated public static URI rewriteURI(URI uri, org.apache.hc.core5.http.HttpHost target, boolean dropFragment) throws URISyntaxException
URIBuilder
.URI
whose scheme, host
and port are taken from the target host, but whose path, query and
fragment are taken from the existing URI. The fragment is only used if
dropFragment is false. The path is set to "/" if not explicitly specified.uri
- Contains the path, query and fragment to use.target
- Contains the scheme, host and port to use.dropFragment
- True if the fragment should not be copied.URISyntaxException
- If the resulting URI is invalid.@Deprecated public static URI rewriteURI(URI uri, org.apache.hc.core5.http.HttpHost target) throws URISyntaxException
URIBuilder
.rewriteURI(URI, HttpHost, boolean)
that always keeps the
fragment.URISyntaxException
@Deprecated public static URI rewriteURI(URI uri) throws URISyntaxException
URIBuilder
.URI
whose scheme, host, port, path,
query are taken from the existing URI, dropping any fragment or user-information.
The path is set to "/" if not explicitly specified. The existing URI is returned
unmodified if it has no fragment or user-information and has a path.uri
- original URI.URISyntaxException
- If the resulting URI is invalid.public static URI resolve(URI baseURI, String reference)
baseURI
- the base URIreference
- the URI referencepublic static URI resolve(URI baseURI, URI reference)
baseURI
- the base URIreference
- the URI referencepublic static org.apache.hc.core5.http.HttpHost extractHost(URI uri)
URI
.uri
- null
if the URI is
relative or does not contain a valid host name.public static URI resolve(URI originalURI, org.apache.hc.core5.http.HttpHost target, List<URI> redirects) throws URISyntaxException
URI
.originalURI
- original request before any redirectstarget
- if the last URI is relative, it is resolved against this target,
or null
if not available.redirects
- collection of redirect locations since the original request
or null
if not available.URISyntaxException
@Deprecated public static URI create(org.apache.hc.core5.http.HttpHost host, String path) throws URISyntaxException
URIBuilder
.URI
instances.URISyntaxException
@Deprecated public static URI create(String scheme, org.apache.hc.core5.net.URIAuthority host, String path) throws URISyntaxException
URIBuilder
.URI
instances.URISyntaxException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.