Facing problem in sending a Mutipart or JSON data through retrofit lib
Retrofit Interface
@Multipart
@POST(\"/api/v1/protected/updateprofile\")
void upl
I have this error a few days ago and I discovered that your solution is correct but add more time
private OkHttpClient getClient() {
OkHttpClient client = new OkHttpClient();
client.setConnectTimeout(5, TimeUnit.MINUTES);
client.setReadTimeout(5, TimeUnit.MINUTES);
return client;
}
private OkHttpClient getClient() {
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(5, TimeUnit.MINUTES)
.readTimeout(5, TimeUnit.MINUTES)
.build();
return client;
}