OkHttp & Interceptors

DATA › Networking

Configuring OkHttp and using interceptors for auth, logging, caching, and TLS.

OkHttp is the de facto HTTP stack on Android and the engine under Retrofit, so interviewers probe how you configure a client and where you hook into the request/response pipeline. Expect to explain the application-vs-network interceptor distinction, how to inject auth tokens, and how caching, timeouts, connection pooling, and certificate pinning are tuned. Getting the interceptor execution model and OkHttpClient sharing right separates seniors from juniors.

What this covers

Study this topic

Further reading