yccheok | 15 Jun 2012 17:37
Picon
Gravatar

Using HttpClient in Desktop and HttpURLConnection in Android

Hi, in desktop development environment (Java SE), we are encouraged to
use Apache HttpClient over HttpURLConnection, as it offers

- Higher level API. Hence, easier to use
- Richer features

Please refer to http://stackoverflow.com/questions/643730/httpclient-vs-httpurlconnection?rq=1

However, for Android, they seem to recommend HttpURLConnection over
Apache HttpClient.

http://android-developers.blogspot.com/2011/09/androids-http-clients.html

I was confused then. Is that we will then loss the convenient of a
easier to use API? For me, I have been a happy user of HttpClient for
several years. Hence, I cannot convince myself of switching to
HttpURLConnection in Android platform.

I was wondering, anyone of you had used both before in Android? Mind
to share out their pros and cons? Which one would you actually
recommend?

Thanks.

--

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
(Continue reading)

b0b | 15 Jun 2012 21:45
Picon

Re: Using HttpClient in Desktop and HttpURLConnection in Android

If you are happy and familiar with HttpClient, use it.
But the Android HttpClient client version is old and buggy and unmaintained and I wouldn't use it as is.
Hopefully you can use the latest jars from the Apache HttpComponents site, but you will have to repackage
them in another package root than org.apache with a tool like JarJar (for example com.mycompany.org.apache...)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Jonathan S | 16 Jun 2012 09:10
Picon
Gravatar

Re: Using HttpClient in Desktop and HttpURLConnection in Android

http://code.google.com/p/httpclientandroidlib/

On Friday, June 15, 2012 3:45:58 PM UTC-4, b0b wrote:

If you are happy and familiar with HttpClient, use it.
But the Android HttpClient client version is old and buggy and unmaintained and I wouldn't use it as is.
Hopefully you can use the latest jars from the Apache HttpComponents site, but you will have to repackage
them in another package root than org.apache with a tool like JarJar (for example com.mycompany.org.apache...)

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Gmane