With OkHttp
library, application is facing following SocketTimeoutException
issue. If request size is less, then it is working fine(Less than 1MB). I a
I solved that problem increasing writeTimeout()
.
Try:
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.connectTimeout(5, TimeUnit.MINUTES) // connect timeout
.writeTimeout(5, TimeUnit.MINUTES) // write timeout
.readTimeout(5, TimeUnit.MINUTES); // read timeout
okHttpClient = builder.build();