Overview
An asynchronous callback-based Http client for Android built on top of Apache’s HttpClient libraries. All requests are made outside of your app’s main UI thread, but any callback logic will be executed on the same thread as the callback was created using Android’s Handler message passing.
综述
基于异步回调的Http的安卓客户端,建立在阿帕奇的httpClient的类库。所有的请求被独立于你的主线程之外,但是回调逻辑相同的线程,将执行创建消息传递。
Features
- Make asynchronous HTTP requests, handle responses in anonymous callbacks
- HTTP requests happen outside the UI thread
- Requests use a threadpool to cap concurrent resource usage
- GET/POST params builder (RequestParams)
- Multipart file uploads with no additional third party libraries
- Tiny size overhead to your application, only 25kb for everything
- Automatic smart request retries optimized for spotty mobile connections
- Automatic gzip response decoding support for super-fast requests
- Binary file (images etc) downloading with
BinaryHttpResponseHandler
- Built-in response parsing into JSON with
JsonHttpResponseHandler
- Persistent cookie store, saves cookies into your app’s SharedPreferences
要点
1、进行http异步请求,在匿名回调处处理响应
2、http请求要求主线程外
3、请求使用线程池去覆盖并发的资源
4.GET/POST参数构造器
5.多文件被上传没有附带而外的第三方库
6.你的应用都是小的开销,每个文件都不超过25kb
7.自动智能手机链接请求优化参差不齐
8.解压方式支持zip超快
9.二进制文件在 BinaryHttpResponseHandler下调用
10.内置的请求被解析成JSON with
JsonHttpResponseHandler
11.持久化的cookie仓库,将你的cookie记录保存在你的SharedPreferences应用下
Used in Production By Top Apps and Developers
-
Instagram
- Instagram is the #1 photo app on android, with over 10million users
- 被应用在高级的应用程序中
- 照片分享应用 Pinterest
- Popular online pinboard. Organize and share things you love.
- 品志闻 Frontline Commando (Glu Games)
- #1 first person shooting game on Android, by Glu Games. Heyzap
- Social game discovery app with millions of users
- 数百万用户使用的社交产品 Pose
- Pose is the #1 fashion app for sharing and discovering new styles
- 姿势 Thousands more apps…
- Async HTTP is used in production by thousands of top apps.
authentication sessions 身份验证会话
remain logged 保持登录
re-opening your app 重启你的应用
fetch 获取
some requests may need username/password credentials when dealing with API services that use HTTP Basic Access Authentication requests. You can use the method setBasicAuth()
to provide your credentials.
Set username/password for any host and realm for a particular request. By default the Authentication Scope is for any host, port and realm.
一些请求在可能需要用户名、密码的验证,当进行API服务时,在使用HTTP基本接口的验证。你需要使用setBasicAuth()来提供这种验证。将用户名、密码设置为特定的请求给予主机和域。在默认的验证中,验证的范围是主机,域和端口。
released 释放