OkHttp parent-3.5.0 發布,一個高效的Http客戶端
OkHttp是一個高效的Http客戶端,在Android開發中被大量使用,主要有如下的特點:
- 支持HTTP2/SPDY黑科技
- socket自動選擇最好路線,并支持自動重連
- 擁有自動維護的socket連接池,減少握手次數
- 擁有隊列線程池,輕松寫并發
- 擁有Interceptors輕松處理請求與響應(比如透明GZIP壓縮,LOGGING)
- 基于Headers的緩存策略
更新日志
- Fix: Prefer the server's response body on all conditional cache misses. Previously we would return the cached response's body if it had a newer
Last-Modified
date. - Fix: Update the stored timestamp on conditional cache hits.
- New: Optimized HTTP/2 request header encoding. More headers are HPACK-encoded and string literals are now Huffman-encoded.
- New: Expose
Part
headers and body inMultipart
. - New: Make
ResponseBody.string()
andResponseBody.charStream()
BOM-aware. If your HTTP response body begins with a byte order mark it will be consumed and used to select a charset for the remaining bytes. Most applications should not not need a byte order mark. - Fix: Add a leading
.
for better domain matching inJavaNetCookieJar
. - Fix: Gracefully recover from HTTP/2 connection shutdowns at start of request.
- Fix: Be lenient if a
MediaType
's character set is'single-quoted'
. - Fix: Allow horizontal tab characters in header values.
- Fix: When parsing HTTP authentication headers permit challenge parameters in any order.
下載
本站原創,轉載時保留以下信息:
本文轉自:深度開源(open-open.com)
原文地址:http://www.baiduhome.net/news/view/525f3bea
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!