intercept

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

Intercepts the network request and checks if there is an active network connection. Throws an IOException if there is no active connection.

Return

The response from the network if there is a connection.

Parameters

chain

The interceptor chain.

Throws

IOException

If there is no active network connection.