how can i check my ESP12E has connected to internet ??

Heloo to everyone.i connected my esp12e to my home router.i want to check my esp12e whether its connected to internet or not.
how can i check?Is there any easy way to check that?

try to download something from a known web site - that's the only true reachability test

Actually it's connected to internet.

const int httpPort = 80;
const char host = api.xxxx.in;
  if (!client.connect(host, httpPort)) {
    Serial.println("connection failed");
    
    return;

i checked with this code.but it take some time.i want to check fast as much i can :slight_smile:

the IP link can be established but internet routing might be down or limited to captive Portals...

So the only way to know is to download something. even big companies do that. Apple for example for its devices is trying to reach out to Success and check in code if you can see "success" (click on the link, that's what you get). When connected to captive portals with no routing, that would fail and so the device knows internet is not accessible

if you find yours slow, try a server closer to you or with a much faster answer time