Skip to main content

check_internet

Function check_internet 

Source
pub async fn check_internet() -> bool
Expand description

Returns true if an outgoing HTTP connection can be established.

Makes a GET request to Google’s generate_204 endpoint (returns 204 No Content instantly, so there’s no body to parse and the round-trip is fast). Falls back to false on any error including timeout.