Google在官方文档里已经不推荐用HttpClient了,为什么这个项目里仍用这个

咖啡OD 发布于 2012/12/21 10:27
阅读 15K+
收藏 2

以下是官方原文(地址:http://developer.android.com/training/basics/network-ops/connecting.html

---------------原文-------------------------

Most network-connected Android apps use HTTP to send and receive data. Android includes two HTTP clients: HttpURLConnection and Apache HttpClient. Both support HTTPS, streaming uploads and downloads, configurable timeouts, IPv6, and connection pooling. We recommend using HttpURLConnection for applications targeted at Gingerbread and higher. For more discussion of this topic, see the blog post Android's HTTP Clients.

------------------------------------------------------

加载中
0
开源海哥
开源海哥
该评论暂时无法显示,详情咨询 QQ 群:点此入群
0
白衫依旧在
白衫依旧在
没说为什么不推荐用啊?
0
景愿
景愿
该评论暂时无法显示,详情咨询 QQ 群:点此入群
0
DW_GYT
DW_GYT

Google也只是推荐使用HttpURLConnection

We recommend using HttpURLConnection for applications targeted at Gingerbread and higher.

0
fneg
fneg
在2.2之前,好像有一个HTTPCLIENT的BUG
0
咖啡OD
咖啡OD

引用来自“拈花微笑”的答案

Google也只是推荐使用HttpURLConnection

We recommend using HttpURLConnection for applications targeted at Gingerbread and higher.

嗯,应该是推荐使用HttpURLConnection。标题这么写确实有点问题。。
0
咖啡OD
咖啡OD

引用来自“michaely”的答案

HttpURLConnection 原则上要比 httpclient快 ,但是httpclient分装了很多很好的东东,可以拿来就用,无需重复制造轮子。


嗯,了解啦,多谢解惑
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部