Class DefaultHttpClient

java.lang.Object
org.apache.http.impl.client.AbstractHttpClient
org.apache.http.impl.client.DefaultHttpClient
All Implemented Interfaces:
HttpClient

public class DefaultHttpClient
extends AbstractHttpClient
Default implementation of an HTTP client.

Prefer HttpURLConnection for new code

Android includes two HTTP clients: HttpURLConnection and Apache HTTP Client. Both support HTTPS, streaming uploads and downloads, configurable timeouts, IPv6 and connection pooling. Apache HTTP client has fewer bugs in Android 2.2 (Froyo) and earlier releases. For Android 2.3 (Gingerbread) and later, HttpURLConnection is the best choice. Its simple API and small size makes it great fit for Android. Transparent compression and response caching reduce network use, improve speed and save battery. See the Android Developers Blog for a comparison of the two HTTP clients.
Since:
4.0
Version:
$Revision: 677250 $
Author:
Roland Weber, Oleg Kalnichevski