Skip to content Skip to sidebar Skip to footer

Retrofit+okhttp Is Ok When Sending Get Requests But Gives Sockettimetout When Sending Post

I'm starting with Retrofit, and I can perform a GET request successfully, but when I try to perform a POST or PUT request, I get a SocketTimeOut Exception. I added OkHttp to my lib

Solution 1:

Check out my comment on the Previously mentioned thread. In your code, it seems that the POST requests don't have the final slash "/"


Post a Comment for "Retrofit+okhttp Is Ok When Sending Get Requests But Gives Sockettimetout When Sending Post"