okhttp / okhttp3 / Interceptor

Interceptor

interface Interceptor

Observes, modifies, and potentially short-circuits requests going out and the corresponding responses coming back in. Typically interceptors add, remove, or transform headers on the request or response.

Types

Chain

interface Chain

Functions

intercept

abstract fun intercept(chain: Interceptor.Chain): Response

Companion Object Functions

invoke

operator fun invoke(block: (chain: Interceptor.Chain) -> Response): Interceptor