com.splitforce.lib.client.net
Class FollowPostRedirectHandler

java.lang.Object
  extended by org.apache.http.impl.client.DefaultRedirectHandler
      extended by com.splitforce.lib.client.net.FollowPostRedirectHandler
All Implemented Interfaces:
org.apache.http.client.RedirectHandler

public class FollowPostRedirectHandler
extends org.apache.http.impl.client.DefaultRedirectHandler


Constructor Summary
FollowPostRedirectHandler()
           
 
Method Summary
 boolean isRedirectRequested(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
          HttpClient is compliant with the requirements of the HTTP specification (RFC 2616) and does not automatically redirect other methods than GET and HEAD.
 
Methods inherited from class org.apache.http.impl.client.DefaultRedirectHandler
getLocationURI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FollowPostRedirectHandler

public FollowPostRedirectHandler()
Method Detail

isRedirectRequested

public boolean isRedirectRequested(org.apache.http.HttpResponse response,
                                   org.apache.http.protocol.HttpContext context)
HttpClient is compliant with the requirements of the HTTP specification (RFC 2616) and does not automatically redirect other methods than GET and HEAD. We have to override this method to automatically follow redirects when using the POST method.

Specified by:
isRedirectRequested in interface org.apache.http.client.RedirectHandler
Overrides:
isRedirectRequested in class org.apache.http.impl.client.DefaultRedirectHandler