OkHttp parent-3.5.0 发布,一个高效的Http客户端

jopen 7年前
   <p style="text-align: center;"><strong><img alt="" src="https://simg.open-open.com/show/a6dcb578e17e7b0fb37f34f8fe57f157.png" /></strong></p>    <p> </p>    <p>OkHttp是一个高效的Http客户端,在Android开发中被大量使用,主要有如下的特点:</p>    <ul>     <li>支持HTTP2/SPDY黑科技</li>     <li>socket自动选择最好路线,并支持自动重连</li>     <li>拥有自动维护的socket连接池,减少握手次数</li>     <li>拥有队列线程池,轻松写并发</li>     <li>拥有Interceptors轻松处理请求与响应(比如透明GZIP压缩,LOGGING)</li>     <li>基于Headers的缓存策略</li>    </ul>    <h2>更新日志</h2>    <ul>     <li>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 <code>Last-Modified</code> date.</li>     <li>Fix: Update the stored timestamp on conditional cache hits.</li>     <li>New: Optimized HTTP/2 request header encoding. More headers are HPACK-encoded and string literals are now Huffman-encoded.</li>     <li>New: Expose <code>Part</code> headers and body in <code>Multipart</code>.</li>     <li>New: Make <code>ResponseBody.string()</code> and <code>ResponseBody.charStream()</code> BOM-aware. If your HTTP response body begins with a <a href="/misc/goto?guid=4958995887016272409">byte order mark</a> it will be consumed and used to select a charset for the remaining bytes. Most applications should not not need a byte order mark.</li>     <li>Fix: Add a leading <code>.</code> for better domain matching in <code>JavaNetCookieJar</code>.</li>     <li>Fix: Gracefully recover from HTTP/2 connection shutdowns at start of request.</li>     <li>Fix: Be lenient if a <code>MediaType</code>'s character set is <code>'single-quoted'</code>.</li>     <li>Fix: Allow horizontal tab characters in header values.</li>     <li>Fix: When parsing HTTP authentication headers permit challenge parameters in any order.</li>    </ul>    <p> </p>    <h2>下载</h2>    <ul>     <li><a href="/misc/goto?guid=4958995887111738407" rel="nofollow"><strong>Source code</strong> (zip)</a></li>     <li><a href="/misc/goto?guid=4958995887202732235" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li>    </ul>    <p>本站原创,转载时保留以下信息:<br /> 本文转自:深度开源(open-open.com)<br /> 原文地址:<a href="http://www.open-open.com/news/view/525f3bea">http://www.open-open.com/news/view/525f3bea</a></p>