开发者

ASIHTTPRequest equivalent for Android or any HTTP request manager/wrapper?

开发者 https://www.devze.com 2023-02-22 03:05 出处:网络
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, ma

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

0

精彩评论

暂无评论...
验证码 换一张
取 消