Interceptor

interface Interceptor

Interceptor intercepts a proxy request and the corresponding response. The interception of mutable Request and Response enables the dynamic transformation of proxied data.

An Interceptor instance may intercept requests and responses concurrently. If the Interceptor implementation is not stateless, then synchronization is required.

Properties

Link copied to clipboard
open val proxier: Proxier?

The Proxier to use to execute Requests intercepted by this Interceptor.

Functions

Link copied to clipboard
open fun intercept(request: Request)

Intercept the request before it is executed.

open fun intercept(response: Response)

Intercept the response after it is received.

Link copied to clipboard
open fun interceptable(request: Request): Boolean

Determine whether the request should be intercepted by this Interceptor.