@Contract(threading=STATELESS) public class DefaultRedirectStrategy extends Object implements RedirectStrategy
RedirectStrategy.| Modifier and Type | Field and Description |
|---|---|
static DefaultRedirectStrategy |
INSTANCE |
| Constructor and Description |
|---|
DefaultRedirectStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected URI |
createLocationURI(String location) |
URI |
getLocationURI(org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.protocol.HttpContext context) |
boolean |
isRedirected(org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.protocol.HttpContext context)
Determines if a request should be redirected to a new location
given the response from the target server.
|
public static final DefaultRedirectStrategy INSTANCE
public boolean isRedirected(org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.HttpResponse response,
org.apache.hc.core5.http.protocol.HttpContext context)
throws org.apache.hc.core5.http.ProtocolException
RedirectStrategyisRedirected in interface RedirectStrategyrequest - the executed requestresponse - the response received from the target servercontext - the context for the request executiontrue if the request should be redirected, false
otherwiseorg.apache.hc.core5.http.ProtocolExceptionpublic URI getLocationURI(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException
getLocationURI in interface RedirectStrategyorg.apache.hc.core5.http.HttpExceptionCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.