How to handle retrofit socket timeout for uploading files in android kotlin?
问题 var client = OkHttpClient() val builder = OkHttpClient.Builder() val gson = GsonBuilder() .setLenient() .create() builder.addInterceptor(AddCookiesInterceptor(mcontext)) builder.addInterceptor(ReceivedCookiesInterceptor(mcontext)) builder.callTimeout(100,TimeUnit.SECONDS) client = builder.build() retrofit = Retrofit.Builder() .baseUrl(BASE_URL) .client(client) .addConverterFactory(GsonConverterFactory.create()) .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) // .addConverterFactory