Sign in Go Pro


Modifying Request URLs and Headers with OkHttp

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next



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





There are no comments on this lesson, start the conversation below ...

You need to go PRO to post comments.

Lessons in RetroFit2