I'm developing an app that will make extensiv开发者_开发技巧e HTTP requests.
I know for a fact that iOS has a third-party library called ASIHTTPRequest to manage and organize all these requests, making it much easier and less tedious.
Is there a similar library available for Android?
According to this talk, if you're targeting pre-Gingerbread versions (<2.3) you should stick to Apache Http Client library. If however you're targeting Gingerbread or later, you will be safer to use the java.net.URLConneciton class as recommended by the Google engineer.
Use https://github.com/loopj/android-async-http
Just like ASIHTTPRequest, this lib makes is easy to make async requests without worrying about threads or async tasks.
It even includes a JSON parser.
You can also use http://code.google.com/p/android-query/wiki/AsyncAPI which looks good
Update : Android has released which does exactly what you want : http://www.javacodegeeks.com/2013/06/android-volley-library-example.html
精彩评论