Prerequisites for this course are Android Studio 4, Kotlin 1.4, and either a physical device that can run Android 5 (API 21) or above or an emulator with the same support.
Prior experience with performing network operations using Retrofit and OkHttp is also required since this course focuses on using OkHttp Interceptors.
Transcript: 01. Learn about OkHttp Interceptors
00:03OkHttp Interceptors are a mechanism that lets you monitor and re-write network calls. If you take a look at the diagram, the app makes an API call that first passes through an interceptor. The interceptor changes the API call and the modified API call is sent to the remote server.
00:23It is possible to chain different interceptors to combine their effects. The order in the chain matter as you will see later in the course. OkHttp maintains a list of Interceptors and hence processes them in-order.
00:40There are two kinds of Interceptors: Application Interceptor and Network Interceptor.
00:48Application interceptors sit between the OkHttp core and the application. They are useful when you are not concerned about the intermediate network responses and want to focus on the final response sent to the app.
01:04Network interceptors sit between the OkHttp core and the network. They are useful when you are concerned about the intermediate network responses and want to focus on things like redirects. Network Interceptors are useful if you want to observe everything that happens between the application making the network call and receiving a final response.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.