Retrofit network calls fails with a Protocol Exception suddenly in a working app. The app was working till yesterday and today all the network calls fails. The calls works f
I am using okhttp3 (okhttp-3.4.1), okhttp3 is not very compatible with the HTTP_1.1 protocol and needs to be manually added. you can see Official link
OkHttpClient.Builder builder = new OkHttpClient.Builder();
//protocols
List protocols = new ArrayList();
protocols.add(Protocol.HTTP_1_1);
protocols.add(Protocol.HTTP_2);
builder.protocols(protocols);