DevConsoleOkHttpInterceptor

class DevConsoleOkHttpInterceptor @JvmOverloads constructor(recorder: NetworkTransactionRecorder, timingsProvider: DevConsoleOkHttpEventListenerFactory? = null) : Interceptor

OkHttp application interceptor that only ever captures a bounded copy of request/response bodies and never lets a capture failure change what the host call sees. All capture errors are isolated from the host call; chain.proceed's result (success or thrown exception) is always exactly what reaches the caller.

timingsProvider, when supplied, must be the same DevConsoleOkHttpEventListenerFactory instance installed as the client's eventListenerFactory -- see that class's kdoc for the wiring. Without it, every recorded transaction's DNS/TCP/TLS/wait/download phases are left null, same as today.

Constructors

Link copied to clipboard
constructor(recorder: NetworkTransactionRecorder, timingsProvider: DevConsoleOkHttpEventListenerFactory? = null)

Functions

Link copied to clipboard
open override fun intercept(chain: Interceptor.Chain): Response