okhttp3 okhttpclient setWriteTime out等效
我正在将OKHTTP.OKHTTPCLIENT.SETWRITETIME OUT转换为OKHTTP3.OKHTTPCLIENT.SETWRITETIMETOUT,但即使使用OKHTTP3.OKHTTPCLIENT.WRITETIMERETIMER,我也会遇到不确定的错误。
这很奇怪,但是writeTimeout在文档中, https://square.github.io/okhttp/3.x/okhttp/okhttp3/okhttpclient.builder.builder.html#builder--
请帮助。
I'm converting the okhttp.OkHttpClient.setWriteTimeout to okhttp3.OkHttpClient.setWriteTimeout but I'm getting undefined error even with okhttp3.OkHttpClient.writeTimeout.
It's weird, but writeTimeout is in the documentation,
https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.Builder.html#Builder--
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WriteTimeOut()是
Okhttp3.okhttpclient.builder
,不是okhttp3.okhttpclient
。我们可以将WriteTimeOut与代理和任何其他配置一起设置为单个建筑商:writeTimeout() is part of
okhttp3.OkHttpClient.Builder
, notokhttp3.OkHttpClient
. We could set the writeTimeout, along with proxy and any other configurations, with a single builder: