Make a synchronous Retrofit call from inside an OkHttp Interceptor
问题 I am trying to automatically refresh an auth token if it is expired. I am using the new Interceptor class that was introduced in OkHttp 2.2 . In the intercept method I am trying the original request with chain.proceed(request) , checking the response code, and if the token is expired I am making a call to a separate Retrofit service, synchronously, to obtain a new token. The strange thing is, no code past the synchronous call seems to run. If I try debugging with a breakpoint on the