isOnline

abstract fun isOnline(): Boolean

Return true if the device can access the internet. Else, return false.

If false, reading from the network will automatically be disabled if the device is offline. If a cached response is unavailable the request will fail with a '504 Unsatisfiable Request' response.