In this lesson we’ll review how to modify your Retrofit 2 requests using OkHttp. Retrofit ships with the ability to add headers to individual requests. However, if you want to add headers to every request, then it’s recommended that you use an OkHttp Interceptor.
In this lesson you will learn :
- What a network interceptor is
- What an application interceptor is
- How to add an application interceptor to add a header value
- How to add an application interceptor to add a query string parameter