Facing problem in sending a Mutipart or JSON data through retrofit lib
Retrofit Interface
@Multipart
@POST(\"/api/v1/protected/updateprofile\")
void upl
For me the problem was from the server side.
I had to disable tcp_timestamp
by changing sysctl
configuration on the API server. Also, if you have other services working over TCP on the same machine i.e. Redis etc., you should watch out for how this affects them.
Found this from an issue on Github.
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;
}