OkHttp 3.10.0 发布,轻量的 Java 网络请求框架

淡漠悠然
 淡漠悠然
发布于 2018年02月26日
收藏 10

OkHttp 3.10.0 发布了,OkHttp 是一个轻量的 Java 网络请求框架。本次更新内容如下:

  • New: HttpUrl.addQueryParameter() percent-escapes more characters. Previously several ASCII punctuation characters were not percent-escaped when used with this method. This does not impact already-encoded query parameters in APIs like HttpUrl.parse() andHttpUrl.Builder.addEncodedQueryParameter().

  • New: CBC-mode ECDSA cipher suites have been removed from OkHttp's default configuration: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA andTLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA. This tracks a Chromium change to remove these cipher suites because they are fragile and rarely-used.

  • New: Don't fall back to common name (CN) verification for hostnames. This behavior was deprecated with RFC 2818 in May 2000 and was recently dropped from major web browsers.

  • New: Honor the Retry-After response header. HTTP 503 (Unavailable) responses are retried automatically if this header is present and its delay is 0 seconds. HTTP 408 (Client Timeout) responses are retried automatically if the header is absent or its delay is 0 seconds.

  • New: Allow request bodies for all HTTP methods except GET and HEAD.

  • New: Automatic module name of okhttp3 for use with the Java Platform Module System.

  • New: Log gzipped bodies when HttpLoggingInterceptor is used as a network interceptor.

  • New: Protocol.QUIC constant. This protocol is not supported but this constant is included for completeness.

  • New: Upgrade to Okio 1.14.0.

详细内容请查看 ChangeLog

下载地址:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 开源中国社区 [http://www.oschina.net]
本文标题:OkHttp 3.10.0 发布,轻量的 Java 网络请求框架
加载中

精彩评论

银杏果果
银杏果果
好消息是JDK9集成了HttpClient组件,移动端用OkHttp还是不错的

最新评论(5

p
piterpan
3.10.0是不是不用再单独集成okio了?
Tinian
Tinian

引用来自“BoXuan”的评论

好消息是JDK9集成了HttpClient组件,移动端用OkHttp还是不错的
还是孵化状态,还是坐等java11 LTS吧
d
dwing0
好像没有用nio,而是用线程池实现的同步多连接, 不适合用于大量并发连接.
进击的代码
进击的代码

引用来自“BoXuan”的评论

好消息是JDK9集成了HttpClient组件,移动端用OkHttp还是不错的
相比之下retrofit封装了OKHTTP更舒服一点
银杏果果
银杏果果
好消息是JDK9集成了HttpClient组件,移动端用OkHttp还是不错的
返回顶部
顶部