简体   繁体   中英

Is there somebody who knows how to send data from a webhosted webdomain to a ESP32 using http get request?

The question is, how can we send data from the Webhosting domain to our esp32 with an HTTP GET Request?

If the ESP32 is behind a local network this is not possible.

If you want to initiate a request from outside of the network where the ESP32 is, you must put the esp32 to the internet.

You can port forward the ESP32's ip address/port on your router. That way you can reach the esp32 via your router's public ip. That way you can do any HTTP request to the ESP32 from anywhere in the world.

I warn you however that this method is not recommended since your network will be open to the outside world on the port you opened.

An other way is to use some kind of a tunnel server. There are solutions for that such as ngrok or husarnet

I would recommend you to create a server somewhere in the cloud and fetch the desired data from that server with the esp32. Since you can request data inside your local network from the outside.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM