OkHttpClient 设置超时

OkHttpClient client = new OkHttpClient.Builder()
    .connectTimeout(10, TimeUnit.SECONDS)
    .writeTimeout(10, TimeUnit.SECONDS)
    .readTimeout(30, TimeUnit.SECONDS)
    .build();

https://blog.csdn.net/workingman_li/article/details/91651156

https://www.jianshu.com/p/68c30beca612
posted @ 2020-10-09 10:11  南方卖菜  阅读(4505)  评论(0编辑  收藏  举报