Share the post "Disable Circular Redirect In Apache HttpClient"
If you have used the Apache HttpClient library, you may have encountered this error. Annoying as it is, there is a way to disable it and it must be set at the client level.
Check the sample code below.
|
1 2 3 4 |
DefaultHttpClient httpclient = new DefaultHttpClient(); final HttpParams params = new BasicHttpParams(); HttpClientParams.setRedirecting(params, false); httpclient.setParams(params); |