java.io.IOException: unexpected end of stream on okhttp3.Address
来源:互联网 发布:淘宝优惠券图标 编辑:程序博客网 时间:2024/05/22 11:36
在使用okhttp和retrofit访问网络的时候,今天测出来问题:
java.io.IOException: unexpected end of stream on okhttp3.Address@XXXX
后解决办法如下:
if (Build.VERSION.SDK != null && Build.VERSION.SDK_INT > 13) { request = request.newBuilder() .removeHeader("encryptValue") .addHeader("encryptValue", key) .addHeader("Connection", "close") .build(); }
增加关闭连接即可
.addHeader("Connection", "close")
阅读全文
0 0
- java.io.IOException: unexpected end of stream on okhttp3.Address
- java.io.IOException: unexpected end of stream on okhttp3.Address@33c2c47
- java.io.IOException: unexpected end of stream
- unexpected end of stream on okhttp3.Address 错误原因
- unexpected end of stream on okhttp3.
- 总结okhttp的错误IOException: unexpected end of stream on okhttp3的解决办法
- java.io.EOFException: Unexpected end of ZLIB input stream
- java.io.EOFException: Unexpected end of input stream
- java.io.EOFException: Unexpected end of ZLIB input stream解决
- Unexpected end of stream.
- java.net.ProtocolException: unexpected end of stream
- 连接mysql报Communication link failure: java.io.IOException, underlying cause: Unexpected end of input s
- java.io.EOFException: Unexpected end of ZLIB input stream异常处理
- hive Caused by: java.io.EOFException: Unexpected end of input stream排查
- okhttp的坑坑坑 unexpected end of stream on Connection
- android: unexpected end of stream
- onFailure unexpected end of stream
- java.io.IOException: Attempted read on closed stream.
- 云端共赢|阿里云(天津)技术与生态合作论坛圆满成功!
- RecyclerView适配器模版
- 浏览器窗口大小改变事件
- 快速输入的模板
- oracle用SQL Developer连接数据库出现的小问题篇章二
- java.io.IOException: unexpected end of stream on okhttp3.Address
- textarea字数进行控制与显示
- IE浏览器Bug总结
- V4L2源代码之旅七:controls
- 曾经的 Java IDE 王者 Eclipse 真的没落了?21 款插件让它强大起来!(转载)
- 深度优先搜索 Tarjan算法 两条不相交的路径
- JVM系列知识汇总
- 欢迎使用CSDN-markdown编辑器
- ue4 碰撞检测测试