What is the best (fastest and most efficient) method of doing an HTTP
Request?
Currently I use:
DefaultHttpClient httpclient= new DefaultHttpClient();
HttpPost httpost = new HttpPost(uri);
httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
HttpResponse response = httpclient.execute(httpost);
HttpEntity entity = response.getEntity();
String sResponse = EntityUtils.toString(entity);
if (close == true)
{
httpclient.getConnectionManager().shutdown();
}
if (entity != null)
{
entity.consumeContent();
}
return sResponse;
It works fine, but it's quite slow...any way to make it faster?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en