intercept

open override fun intercept(chain: Interceptor.Chain): Response

Intercepts the chain and checks for network connection. If there is no connection, it throws an IOException. Otherwise, it proceeds with the chain.

Return

The response from the chain.

Parameters

chain

The chain to intercept.

Throws

IOException

If there is no network connection.