Intercept OkHttpClient Response for Debug
March 16, 2016 —Category: Software
I wanted to log the data retrieved by OkHttpClient for debugging purposes. After digging for a while, the process seems quite straight-forward now. First, we create the OkHttpClient : Then, we add an interceptor: The interceptor code is: The main thing to remember is that one the response has…