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

拈花ヽ惹草 提交于 2019-12-03 13:17:32

问题


I'm developing an app that will make extensive 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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/5560762/asihttprequest-equivalent-for-android-or-any-http-request-manager-wrapper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!