-
2.2之前:HttpClient
-
2.3之后:HttpURLConnection
-
2013年Google IO大会后:Google官方团队推出的volley
-
OkHttp出现以后:OkHttp
-
Android6.0以后Google官方Api移除HttpClient(继续使用HttpClient及基于其封装的网络库会出异常)
-
现在:推荐retrofit+OkHttp
-
我负责的项目中实际使用的网络层封装为rxJava+retrofit+OkHttp,简述一下:
- rxjava:负责订阅回调,将请求回调切到主线程、中间回调拦截处理:统一异常处理等;
- Retrofit:网络请求框架,配合OkHttp使用,使得网络请求更方便、更强大;
- OkHttp:与HttpClient和HttpURLConnection类似,最底层实际处理Http请求。
-
Notifications
You must be signed in to change notification settings - Fork 3
bailiangjin/AndroidHttpRequest
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Android网络请求总结范例
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published