android-async-http框架
Posted lxjshuju
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android-async-http框架相关的知识,希望对你有一定的参考价值。
android-async-http
简单介绍:An asynchronous, callback-based Http client for android built on top
of Apache‘s HttpClient libraries.即在Apache‘s
HttpClient 开源框架(该Apache‘s HttpClient 框架在eclipse里面不用导入额外的jar包,由于已经自带了)的基础上为android所设计的框架。
Features
- Make asynchronous HTTP requests, handle responses in anonymous callbacks
- 异步的HTTP请求,异步的响应回调
- HTTP requests happen outside the UI thread
- HTTP请求不在UI线程内。避免了ANR错误
- Requests use a threadpool to cap concurrent resource usage
- 通过threadpool实现Request,限制并发资源的使用
- GET/POST params builder (RequestParams)
- Multipart file uploads with no additional third party libraries
- Tiny size overhead to your application, only 19kb for everything
- Automatic smart request retries optimized for spotty mobile connections
- Automatic gzip response decoding support for super-fast requests
- Optional built-in response parsing into JSON (JsonHttpResponseHandler)
- Optional persistent cookie store, saves cookies into your app‘s SharedPreferences
- 可选择性的永久cookie保存。在你的SharedPreferences上保存cookies
可用在get/post提交数据上
Documentation, Features and Examples
Full details and documentation can be found on the project page here:
http://loopj.com/android-async-http/
以上是关于android-async-http框架的主要内容,如果未能解决你的问题,请参考以下文章
已解决使用android-async-http网络请求框架出现Header[]不识别错误的解决办法
已解决使用android-async-http网络请求框架出现Header[]不识别错误的解决办法
利用loopj的android-async-http进行文件上传