Class DefaultRedirectStrategy

java.lang.Object
org.apache.http.impl.client.DefaultRedirectStrategy
All Implemented Interfaces:
RedirectStrategy
Direct Known Subclasses:
LaxRedirectStrategy

@Contract(threading=IMMUTABLE) public class DefaultRedirectStrategy extends Object implements RedirectStrategy
Default implementation of RedirectStrategy. This strategy honors the restrictions on automatic redirection of entity enclosing methods such as POST and PUT imposed by the HTTP specification. 302 Moved Temporarily, 301 Moved Permanently and 307 Temporary Redirect status codes will result in an automatic redirect of HEAD and GET methods only. POST and PUT methods will not be automatically redirected as requiring user confirmation.

The restriction on automatic redirection of POST methods can be relaxed by using LaxRedirectStrategy instead of DefaultRedirectStrategy.

Since:
4.1
See Also: