Android APIs
public class

DefaultHttpClient

extends AbstractHttpClient
java.lang.Object
   ↳ org.apache.http.impl.client.AbstractHttpClient
     ↳ org.apache.http.impl.client.DefaultHttpClient

Class Overview

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.

Summary

Public Constructors
DefaultHttpClient(ClientConnectionManager conman, HttpParams params)
Creates a new HTTP client from parameters and a connection manager.
DefaultHttpClient(HttpParams params)
DefaultHttpClient()
Protected Methods
AuthSchemeRegistry createAuthSchemeRegistry()
ClientConnectionManager createClientConnectionManager()
ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
ConnectionReuseStrategy createConnectionReuseStrategy()
CookieSpecRegistry createCookieSpecRegistry()
CookieStore createCookieStore()
CredentialsProvider createCredentialsProvider()
HttpContext createHttpContext()
HttpParams createHttpParams()
BasicHttpProcessor createHttpProcessor()
HttpRequestRetryHandler createHttpRequestRetryHandler()
HttpRoutePlanner createHttpRoutePlanner()
AuthenticationHandler createProxyAuthenticationHandler()
RedirectHandler createRedirectHandler()
HttpRequestExecutor createRequestExecutor()
AuthenticationHandler createTargetAuthenticationHandler()
UserTokenHandler createUserTokenHandler()
[Expand]
Inherited Methods
From class org.apache.http.impl.client.AbstractHttpClient
From class java.lang.Object
From interface org.apache.http.client.HttpClient

Public Constructors

public DefaultHttpClient (ClientConnectionManager conman, HttpParams params)

Added in API level 1

Creates a new HTTP client from parameters and a connection manager.

Parameters
conman the connection manager
params the parameters

public DefaultHttpClient (HttpParams params)

Added in API level 1

public DefaultHttpClient ()

Added in API level 1

Protected Methods

protected AuthSchemeRegistry createAuthSchemeRegistry ()

Added in API level 1

protected ClientConnectionManager createClientConnectionManager ()

Added in API level 1

protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy ()

Added in API level 1

protected ConnectionReuseStrategy createConnectionReuseStrategy ()

Added in API level 1

protected CookieSpecRegistry createCookieSpecRegistry ()

Added in API level 1

protected CookieStore createCookieStore ()

Added in API level 1

protected CredentialsProvider createCredentialsProvider ()

Added in API level 1

protected HttpContext createHttpContext ()

Added in API level 1

protected HttpParams createHttpParams ()

Added in API level 1

protected BasicHttpProcessor createHttpProcessor ()

Added in API level 1

protected HttpRequestRetryHandler createHttpRequestRetryHandler ()

Added in API level 1

protected HttpRoutePlanner createHttpRoutePlanner ()

Added in API level 1

protected AuthenticationHandler createProxyAuthenticationHandler ()

Added in API level 1

protected RedirectHandler createRedirectHandler ()

Added in API level 1

protected HttpRequestExecutor createRequestExecutor ()

Added in API level 1

protected AuthenticationHandler createTargetAuthenticationHandler ()

Added in API level 1

protected UserTokenHandler createUserTokenHandler ()

Added in API level 1