Interceptor
interface Interceptor
An object that intercepts requests before being sent and responses before being returned. The intercept function is a suspending function, meaning it is invoked as a coroutine. The coroutine shares the kotlin.coroutines.CoroutineContext used when the HTTP call is first initiated. Typically, this means that all interceptors, along with the HTTP call, are invoked within the same CoroutineScope, and thus typically have the same parent kotlinx.coroutines.Job.
Functions
Link copied to clipboard
abstract suspend fun <T> intercept(request: <Error class: unknown class>, chain: Interceptor.Chain<T>): <Error class: unknown class><T>
Intercepts the given request and returns the resulting response, typically by invoking Chain.forward on the given chain.