ConnectivityHints

Feeds real request outcomes into a ConnectivityMonitor:

What the monitor does with each hint is configured on the monitor (hints { ... }): by default a response marks online and a failure triggers a fresh check, never an instant "offline". Cancelled requests (the user left the screen) are never reported. Install it in common code: on Android and iOS the monitor ignores hints unless hints { applyOnNativePlatforms = true }.

HttpClient(engine) {
install(ConnectivityHints) { monitor = connectivityMonitor }
}