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

栏目: 软件资讯 · 发布时间: 7年前

内容简介:okhttp 3.9.0 已发布,该版本包括大量 bug 修复,以及新功能,具体如下: Version 3.9.0 2017-09-03 Interceptors are more capable. The Chain interface now offers access to the call and can adjust al...

okhttp 3.9.0 已发布,该版本包括大量 bug 修复,以及新功能,具体如下:

Version 3.9.0 2017-09-03

  • Interceptors are more capable. The Chain interface now offers access to the call and can adjust all call timeouts. Note that this change is source-incompatible for code that implements the Chain interface. We don't expect this to be a problem in practice!

  • OkHttp has an experimental new API for tracking metrics. The new EventListener API is designed to help developers monitor HTTP requests' size and duration. This feature is an unstable preview: the API is subject to change, and the implementation is incomplete. This is a big new API we are eager for feedback.

  • New: Support ALPN via Google Play Services' Dynamic Security Provider. This expands HTTP/2 support to older Android devices that have Google Play Services.

  • New: Consider all routes when looking for candidate coalesced connections. This increases the likelihood that HTTP/2 connections will be shared.

  • New: Authentication challenges and credentials now use a charset. Use this in your authenticator to support user names and passwords with non-ASCII characters.

  • New: Accept a charset in FormBody.Builder. Previously form bodies were always UTF-8.

  • New: Support the immutable cache-control directive.

  • Fix: Don't crash when an HTTP/2 call is redirected while the connection is being shut down.

  • Fix: Don't drop headers of healthy streams that raced with GOAWAY frames. This bug would cause HTTP/2 streams to occasional hang when the connection was shutting down.

  • Fix: Honor OkHttpClient.retryOnConnectionFailure() when the response is a HTTP 408 Request Timeout. If retries are enabled, OkHttp will retry exactly once in response to a 408.

  • Fix: Don't crash when reading the empty HEAD response body if it specifies a Content-Length.

  • Fix: Don't crash if the thread is interrupted while reading the public suffix database.

  • Fix: Use relative resource path when loading the public suffix database. Loading the resource using a path relative to the class prevents conflicts when the OkHttp classes are relocated (shaded) by allowing multiple private copies of the database.

  • Fix: Accept cookies for URLs that have an IPv6 address for a host.

  • Fix: Don't log the protocol (HTTP/1.1, h2) in HttpLoggingInterceptor if the protocol isn't negotiated yet! Previously we'd log HTTP/1.1 by default, and this was confusing.

  • Fix: Omit the message from MockWebServer's HTTP/2 :status header.

  • Fix: Handle 'Expect: 100 Continue' properly in MockWebServer.

下载地址:


【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

基业长青

基业长青

[美] 詹姆斯·柯林斯、[美] 杰里·波勒斯 / 真如 / 中信出版社 / 2006-9 / 39.00元

如何建立一个伟大并长盛不衰的公司?有思想的人们早已经厌倦了“年度流行语”般稍纵即逝的管理概念,他们渴求获得能经受时间考验的管理思想。 柯林斯和波勒斯在斯坦福大学为期6年的研究项目中,选取了18个卓越非凡、长盛不衰的公司作了深入的研究,这些公司包括通用电气、3M、默克、沃尔玛、惠普、迪士尼等,它们平均拥有近百年的历史。是什么使这些公司不同于它们的竞争对手呢?他们拥有什么别的公司所不具有的法宝呢......一起来看看 《基业长青》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

html转js在线工具
html转js在线工具

html转js在线工具