Skip to content Skip to sidebar Skip to footer

Socket Timeout When Making HTTPGet Requests Using DefaultHTTPClient

What are the pros and cons behind reusing DefaultHTTPClient when sending HTTP requests from an Android app to an external server? I tried using reusing a DefaultHTTPClient when mak

Solution 1:

What API level are you on?

If you're on 8 or above you might consider trying AndroidHttpClient, which may have a better socket timeouts specified.

Otherwise, you might examine how you're creating the DefaultHttpClient and try specifying longer timeouts.


Post a Comment for "Socket Timeout When Making HTTPGet Requests Using DefaultHTTPClient"