Chat freely about anything...

User avatar
By Zach Bellay
#52351 When you visit 192.168.1.25/lamp_on, the following code is triggered and turns on the lamp.

Code: Select all  server.on("/lamp_on", [](){
    server.sendHeader("Location", String("/"), true);
    server.send ( 302, "text/plain", "");       
    IFTTT_HTTP_GET("lamp_on");   
  });

Now this is great if I'm on a desktop, laptop, mobile, etc, but I want to be able to trigger this with the same ESP that is hosting this web server. Can I use an HTTP GET to have the ESP visit itself?