Top "Okhttp" questions

An HTTP+HTTP/2 client for Android and Java applications.

OKHttp throwing an illegal state exception when I try to log the network response

I put the following interceptor on my OkHttp client: httpClient.addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws …

java android retrofit okhttp
How to download image file by using okhttpclient in Java

I would like ask how to download image file by using okhttpclient in Java since I need to download the …

java image download okhttp
ProGuard not working with okhttp

ProGuard won't play nice with okhttp and I keep getting the following Warnings: Warning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: …

android android-studio proguard retrofit okhttp
Retrofit API call receives "HTTP FAILED: java.io.IOException: Canceled"

Can't figure out why is this happening. Neither one of rx callbacks (onCompleted(), onError(), onNext()) not gets triggered by my …

android rx-java retrofit2 okhttp rx-android
Using RxJava and Okhttp

I want to request to a url using okhttp in another thread (like IO thread) and get Response in the …

java android rx-java okhttp
Upload binary file with okhttp from resources

I need to upload a binary file bundled in an apk to a server using okhttp. Using urlconnection, you can …

android okhttp
Returning error from OKHttp interceptor (using retrofit)

I am using OkHttp with Retrofit to make my app's network requests. I am also using Interceptors for Authentication and …

java android retrofit interceptor okhttp
How to get raw response and request using Retrofit 2.0

I am trying to get the raw response using Retrofit2.0.2. So far I tried to print the response using following …

java android retrofit retrofit2 okhttp
OKhttp PUT example

My requirement is to use PUT, send a header and a body to server which will update something in the …

android retrofit okhttp android-networking androidhttpclient
Accessing body string of an OkHttp Response twice results in IllegalStateException: closed

I implement my http calls via the OkHttp library. Everything works fine, but I noticed that, when I access the …

android okhttp