Top Description Fields Constructors Methods
org.apache.http.impl.client

public Class DefaultRedirectHandler

extends Object
implements RedirectHandler
Class Inheritance
All Implemented Interfaces
org.apache.http.client.RedirectHandler
Annotations
@Contract
threading:IMMUTABLE
@Deprecated
Imports
java.net.URI, .URISyntaxException, org.apache.commons.logging.Log, .LogFactory, org.apache.http.Header, .HttpHost, .HttpRequest, .HttpResponse, .HttpStatus, .ProtocolException, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.client.CircularRedirectException, .RedirectHandler, org.apache.http.client.methods.HttpGet, .HttpHead, org.apache.http.client.params.ClientPNames, org.apache.http.client.utils.URIUtils, org.apache.http.params.HttpParams, org.apache.http.protocol.ExecutionContext, .HttpContext, org.apache.http.util.Args, .Asserts

Deprecated

(4.1) use DefaultRedirectStrategy.

Default implementation of RedirectHandler.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final Log
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public URI
getLocationURI(final HttpResponse
the response received from the target server
response
,
final HttpContext
the context for the request execution
context
)

Implements org.apache.http.client.RedirectHandler.getLocationURI.

Determines the location request is expected to be redirected to given the response from the target server and the current request execution context.
public boolean
isRedirectRequested(final HttpResponse
the response received from the target server
response
,
final HttpContext
the context for the request execution
context
)

Implements org.apache.http.client.RedirectHandler.isRedirectRequested.

Determines if a request should be redirected to a new location given the response from the target server.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private final Log log
REDIRECT_LOCATIONSback to summary
private static final String REDIRECT_LOCATIONS

Constructor Detail

DefaultRedirectHandlerback to summary
public DefaultRedirectHandler()

Method Detail

getLocationURIback to summary
public URI getLocationURI(final HttpResponse response, final HttpContext context) throws ProtocolException

Implements org.apache.http.client.RedirectHandler.getLocationURI.

Doc from org.apache.http.client.RedirectHandler.getLocationURI.

Determines the location request is expected to be redirected to given the response from the target server and the current request execution context.

Parameters
response:HttpResponse

the response received from the target server

context:HttpContext

the context for the request execution

Returns:URI

redirect URI

Annotations
@Override
isRedirectRequestedback to summary
public boolean isRedirectRequested(final HttpResponse response, final HttpContext context)

Implements org.apache.http.client.RedirectHandler.isRedirectRequested.

Doc from org.apache.http.client.RedirectHandler.isRedirectRequested.

Determines if a request should be redirected to a new location given the response from the target server.

Parameters
response:HttpResponse

the response received from the target server

context:HttpContext

the context for the request execution

Returns:boolean

true if the request should be redirected, false otherwise

Annotations
@Override