public class FragmentRedirectStrategy extends Object implements RedirectStrategy2
This strategy is based on DefaultRedirectStrategy
but differs for local redirections:
If a local (same provider) redirection is detected, the URI is returned as relative. This ensure that a public (visible) url is not used instead of the provider url for the next requests.
Constructor and Description |
---|
FragmentRedirectStrategy() |
Modifier and Type | Method and Description |
---|---|
URI |
getLocationURI(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
For local redirects, converts to relative urls.
|
org.apache.http.client.methods.HttpUriRequest |
getRedirect(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context) |
boolean |
isRedirected(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context) |
public boolean isRedirected(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.ProtocolException
isRedirected
in interface org.apache.http.client.RedirectStrategy
org.apache.http.ProtocolException
DefaultRedirectStrategy.isRedirected(HttpRequest, HttpResponse, HttpContext)
public org.apache.http.client.methods.HttpUriRequest getRedirect(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.ProtocolException
getRedirect
in interface org.apache.http.client.RedirectStrategy
org.apache.http.ProtocolException
DefaultRedirectStrategy.getRedirect(HttpRequest, HttpResponse, HttpContext)
public URI getLocationURI(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.ProtocolException
getLocationURI
in interface RedirectStrategy2
request
- must be an OutgoingRequest
.org.apache.http.ProtocolException
Copyright © 2008–2018. All rights reserved.