Wondering if the order of interceptors plays a rol...
# android
r
Wondering if the order of interceptors plays a role in retrofit?
stackoverflow 1
google 1
l
Interceptors are an OkHttp thing (which is used by Retrofit indeed), and yes, their order matters.
r
Yeah. Referred to Okhttp. Thanks @louiscad I didn't look how interceptor are added in the okHttpClient. I was under the impression all interceptors are added at the compile time and invoked at run time. So may be order doesn't matter. Are interceptors somehow interconnected based on order?
l
Interceptors are added when you configure the OkHttp client, and the first one will be the first to receive the call.
👍 1
r
Gothcha. Thanks @louiscad