ConnectivityHintsInterceptor

class ConnectivityHintsInterceptor(monitor: ERROR CLASS: Symbol not found for ConnectivityMonitor, ignore: (ERROR CLASS: Symbol not found for Request) -> Boolean = { false }) : <ERROR CLASS> ERROR CLASS: Symbol not found for Interceptor(source)

OkHttp application interceptor that feeds request outcomes into a ConnectivityMonitor: any response → ConnectivityMonitor.reportReachable; an IOException → ConnectivityMonitor.requestRecheck. Cancelled calls are never reported. What each hint does is configured on the monitor (hints { ... }).

OkHttpClient.Builder().addInterceptor(ConnectivityHintsInterceptor(monitor)).build()

Parameters

ignore

requests to leave out, e.g. analytics.

Constructors

Link copied to clipboard
constructor(monitor: ERROR CLASS: Symbol not found for ConnectivityMonitor, ignore: (ERROR CLASS: Symbol not found for Request) -> Boolean = { false })

Functions

Link copied to clipboard
open override fun intercept(chain: ERROR CLASS: Symbol not found for Interceptor.Chain): ERROR CLASS: Symbol not found for Response