okhttp 是一个 JavaHTTP+SPDY 客户端开发包,同时也支持 Android

示例代码:

    OkHttpClIEnt client = new OkHttpClient();

    String get(URL url) throws IOException {
      HttpURLConNECtion connection = client.open(url);
      InputStream in = null;
      try {
        // Read the response.
        in = connection.getInputStream();
        byte[] response = readFully(in);
        return new String(response, "UTF-8");
      } finally {
        if (in != null) in.close();
      }
    }
OkHttp 3.9.1 发布,轻量的 Java 网络请求框架
okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。示例代码:    OkHttpClient client = new OkHttpClient();     String get(URL url) throws IOException {       HttpURLC

发布于 2017-11-20 07:22:32 | 213 次阅读

OkHttp 3.9.1 发布,轻量的 Java 网络请求框架
OkHttp 3.9.1 已发布,该版本更新内容不多,包含两个新特性和一个修复:Version 3.9.1  2017-11-18New: Recover gracefully when Android's DNS crashes with an unexpected NullPointerException.New: Recover gracefully when Android's socket connections crash with an unexpected ClassCastEx

发布于 2017-11-19 01:01:38 | 219 次阅读

OkHttp 3.9.0 发布,轻量的 Java 网络请求框架
okhttp 3.9.0 已发布,该版本包括大量 bug 修复,以及新功能,具体如下:Version 3.9.0 2017-09-03Interceptors 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

发布于 2017-09-11 03:57:54 | 186 次阅读

okhttp 3.8.1 发布,HTTP+SPDY 客户端开发包
okhttp 3.8.1 发布了。okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。暂未发现该版本更新内容,请查看发行首页保持关注。下载地址:Source code (zip)Source code (tar.gz)

发布于 2017-06-19 03:21:32 | 142 次阅读

okhttp 3.8.0 发布,HTTP+SPDY 客户端开发包
okhttp 3.8.0 发布了。okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。下载方式:Download the latest JAR or grab via Maven:   com.squareup.okhttp3   mockwebserver &n

发布于 2017-05-15 03:49:08 | 173 次阅读

okhttp 3.7.0 发布,HTTP+SPDY 客户端开发包
okhttp 3.7.0 发布了。okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。暂未提供更新内容。下载地址:Source code (zip)Source code (tar.gz)

发布于 2017-04-18 06:58:53 | 165 次阅读

easy-okhttp 1.0.10-Final 发布
easy-okhttp 1.0.10-Final 发布了,easy-okhttp是一个基于okhtp3的网络工具,目的为了简化okhttp3的使用,解放使用apache-httpclient的同学们,因为apache-httpclient还是蛮复杂的。更新内容对OkHttpClient实现全局单例,节省创建OkHttpClient耗时修复POST文件的一些bug完善文档版本1.0.10-Final是1.0.x的最终版,后面的更

发布于 2017-01-04 03:51:12 | 168 次阅读

okhttp 3.5.0 发布,HTTP+SPDY 客户端开发包
okhttp 3.5.0 发布了,okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。更新内容:IP request with httpsByte-Range CachingCertificate pinning should accept an expiration date更多内容,点击此处查看。下载地址:Source code (zip)Source code (tar.gz)

发布于 2016-12-05 03:25:28 | 383 次阅读

NoHttp1.1 发布,完美切入OKHttp 和 RxJava
NoHttp1.1 发布了,支持与RxJava完美结合、支持一句话切换底层OkHttp、URLConnection,支持缓存数据到DB或者SD卡,支持Cookie的自动维护,完美支持Restful风格的接口,比Retrofit更简单易用。效果预览:NoHttp 源码地址:https://github.com/yanzhenjie/NoHttp

发布于 2016-10-17 01:30:12 | 160 次阅读

okhttp 3.4.0 和 3.4.1 发布,HTTP+SPDY 客户端开发包
okhttp 3.4.0 和 3.4.1 发布了,okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。3.4.0 更新如下: New: Support dynamic table size changes to HPACK Encoder. Fix: Use TreeMap in Headers.toMultimap(). This makes string lookups on the returned map case-insens

发布于 2016-07-11 03:22:52 | 175 次阅读

okhttp 3.4.0 RC1 发布,HTTP+SPDY 客户端开发包
okhttp 3.4.0 RC1 发布了,更新如下:改写了 HttpURLConnection 和 HttpsURLConnection. Cipher suites 现在可能有任意的名称。Fix: CertificatePinner now matches canonicalized hostnames. Fix: Don’t crash on non-ASCII ETag headers. Previously OkHttp would reject these headers w

发布于 2016-07-04 23:51:36 | 242 次阅读

okhttp 3.3.1 发布,HTTP+SPDY 客户端开发包
okhttp 3.3.1 发布,该版本主要是 Bug 修复,包括:Fix: The plaintext check in HttpLoggingInterceptor incorrectly classified newline characters as control characters. This is fixed.Fix: Don't crash reading non-ASCII characters in HTTP/2 headers or in cached HTTP headers.Fix: Retain the response bod

发布于 2016-05-30 02:23:42 | 193 次阅读

okhttp 3.3.0 发布,HTTP 客户端开发包
okhttp 3.3.0 发布了,改进记录如下:New: Response.sentRequestAtMillis() and receivedResponseAtMillis()methods track the system's local time when network calls are made. These replace the OkHttp-Sent-Millis and OkHttp-Sent-Millis headers that were present in earlier versions of OkHttp.New: Accept

发布于 2016-05-26 08:22:06 | 395 次阅读

okhttp 2.7.5 和3.2.0 发布,HTTP 客户端开发包
 okhttp 2.7.5 和 3.2.0 发布了,okhttp 是一个 Java 的 HTTP+SPDY 客户端开发包,同时也支持 Android。okhttp 2.7.5 更新记录: Fix: Change the certificate pinner to always build full chains. This prevents a potential crash when using certificate pinning with the Google Play Services security

发布于 2016-03-02 07:55:12 | 182 次阅读

详解okhttp3 请求头不能为中文的坑
本篇内容主要为大家讲解的是详解okhttp3 请求头不能为中文的坑。感兴趣的同学可以参考学习下,具体内容如下:

发布于 2017-09-10 02:43:58 | 174 次阅读


Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务