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()Content copied to clipboard
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 })