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.
interface Chain |
abstract fun intercept(chain: Interceptor.Chain): Response |
operator fun invoke(block: (chain: Interceptor.Chain) -> Response): Interceptor
Constructs an interceptor for a lambda. This compact syntax is most useful for inline interceptors. |