A library which handle HTTP calls made from your application. This library make HTTP calls in background thread. So many of us who get errors like "Network Call on UI Thread" can be solved by using this library.
Name of this library is Android Asynchronous Http Client.
Following are some of features of this library.
Following code demonstrate how to use it.
- Make asynchronous HTTP requests, handle responses in anonymous callbacks
- HTTP requests happen outside the UI thread
- Requests use a threadpool to cap concurrent resource usage
- GET/POST params builder (RequestParams)
- Multipart file uploads with no additional third party libraries
- Tiny size overhead to your application, only 25kb for everything
- Automatic smart request retries optimized for spotty mobile connections
- Automatic gzip response decoding support for super-fast requests
- Binary file (images etc) downloading with
- Built-in response parsing into JSON with
- Persistent cookie store, saves cookies into your app's SharedPreferences
You can see that its very easy to use this library.
AsyncHttpClient client = new AsyncHttpClient();
client.get("http://www.google.com", new AsyncHttpResponseHandler()
@Override public void onSuccess(String response)