Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is first called - interceptor or authenticator? OkHttp, Retrofit

Tags:

android

okhttp

As I read from docs, OkHttp uses lists to track interceptors, and interceptors are called in order.

But what is first being called a list of interceptors or an authenticator?

like image 846
Veniamin Avatar asked Oct 31 '25 19:10

Veniamin


1 Answers

Reading the source, the authenticator is called by RetryAndFollowUpInterceptor that is added to the call's interceptor list after the client's interceptors. So, client interceptors are invoked first.

like image 169
laalto Avatar answered Nov 03 '25 08:11

laalto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!