【发布时间】:2015-12-14 10:01:54
【问题描述】:
要在 Gradle 构建中使用 OkHttp,我需要将以下依赖项添加到 Gradle 构建中。
compile 'com.squareup.okhttp:okhttp:2.5.0'
这是否意味着我正在使用实现熟悉的java.net.HttpURLConnection API 的 okhttp-urlconnection 模块或实现 Apache HttpClient API 的okhttp-apache 模块?
【问题讨论】:
-
okhttp 是 Square 实现的 http 库。 github.com/square
-
使用
Response/RequestAPI。其他的将很快被弃用。阅读:publicobject.com/2015/12/15/okurlfactory-is-going-away
标签: java android okhttp android-networking androidhttpclient