Dinorah Tovar
1 min readApr 24, 2019

--

When you use Header annotations they are static for every call, with an interceptor you can change it on runtime and resend the same request without the need to call again the request.

They are completely different approachments, for example, if you want to lock the user Token out, every response will get a 401 code that is “Unauthorized” to refresh the token, without the user notice, you need to do it with a interceptor cause the token Header will never be static

--

--

Dinorah Tovar
Dinorah Tovar

Written by Dinorah Tovar

Google Developer Expert on Android | Doing Kotlin | Making Software 24/7 | Kotlin Multiplatform | She/Her | Opinions are my own, and not my employer

No responses yet