Okhttp: How to solve too many follow up request:21?

Created on 4 Aug 2016  Â·  5Comments  Â·  Source: square/okhttp

When I use okhttp,this problem happens.When I use httpclient everything goes well.Why?

Most helpful comment

Typically this happens when you get into a redirect loop, or when you authenticate with the wrong username, and then retry with the same wrong username. You can fix your Authenticator to check if it is a follow-up request and not retry in that case.

All 5 comments

Typically this happens when you get into a redirect loop, or when you authenticate with the wrong username, and then retry with the same wrong username. You can fix your Authenticator to check if it is a follow-up request and not retry in that case.

Please ask any follow up questions on Stack Overflow.

Thank guy.Why Httpclient does not exist this question?

Apache one? They are Legacy HTTP client that is unsupported on Android.

@iNoles You are right.But only httpclient can solve the redirect successfully.I even used HttpConnection nad and failed.

Was this page helpful?
0 / 5 - 0 ratings