Package org.apache.http.impl.client
Class DefaultRedirectHandler
java.lang.Object
org.apache.http.impl.client.DefaultRedirectHandler
- All Implemented Interfaces:
RedirectHandler
public class DefaultRedirectHandler extends Object implements RedirectHandler
Default implementation of
RedirectHandler.- Since:
- 4.0
- Version:
- $Revision: 673450 $
- Author:
- Oleg Kalnichevski
-
Constructor Summary
Constructors Constructor Description DefaultRedirectHandler() -
Method Summary
Modifier and Type Method Description URIgetLocationURI(HttpResponse response, HttpContext context)Determines the location request is expected to be redirected to given the response from the target server and the current request execution context.booleanisRedirectRequested(HttpResponse response, HttpContext context)Determines if a request should be redirected to a new location given the response from the target server.
-
Constructor Details
-
DefaultRedirectHandler
public DefaultRedirectHandler()
-
-
Method Details
-
isRedirectRequested
Description copied from interface:RedirectHandlerDetermines if a request should be redirected to a new location given the response from the target server.- Specified by:
isRedirectRequestedin interfaceRedirectHandler- Parameters:
response- the response received from the target servercontext- the context for the request execution- Returns:
trueif the request should be redirected,falseotherwise
-
getLocationURI
Description copied from interface:RedirectHandlerDetermines the location request is expected to be redirected to given the response from the target server and the current request execution context.- Specified by:
getLocationURIin interfaceRedirectHandler- Parameters:
response- the response received from the target servercontext- the context for the request execution- Returns:
- redirect URI
- Throws:
ProtocolException
-