okhttp / okhttp3 / 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.


Name Summary
Chain interface Chain


Name Summary
intercept abstract fun intercept(chain: Chain):Response

Companion Object Functions

Name Summary
invoke Constructs an interceptor for a lambda. This compact syntax is most useful for inline interceptors.operator fun invoke(block: (chain: Chain) ->Response):Interceptor