Question: How to use DefaultHttpClient in Android?

Answer: 
Here is a general code example:

```
DefaultHttpClient defaultHttpClient = new DefaultHttpClient();

HttpGet method = new HttpGet(new URI("http://foo.com"));
HttpResponse response = defaultHttpClient.execute(method);
InputStream data = response.getEntity().getContent();
//Now we use the input stream remember to close it ....

```
From [Google Documentation](http://developer.android.com/reference/org/apache/http/impl/client/DefaultHttpClient.html)

`public DefaultHttpClient (ClientConnectionManager conman, HttpParams params)`

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

Parameters  

`"conman"` the connection manager,  

`"params"` the parameters

```
public DefaultHttpClient (HttpParams params)
public DefaultHttpClient ()

```