Sending Data via WiFi using the ESP32 - Code Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มิ.ย. 2024
  • In today's video we are going to talk about GET and POST request. In this video sement i have covered on the GET request in detail. The POST request will be covered in the next segment.
    Links for the Library :
    github.com/me-no-dev/ESPAsync...
    0:00 Introduction
    1:22 Setup
    2:16 Code Simplified/Explained
    9:54 Accessing the Webserver
    12:08 Receving Data with GET
    12:56 Sending Data with POST
    Link for Components required
    ESP32 - a.co/d/3z2oQC6
    MicroUSB - (use a data cable that was used for old android phones)
    WiFi Router - This Code can collect the ESP32 locally as well
    server.on("/"): This line sets up a handler for a specific route on the server. In this case, it's the root URL ("/"), which is the default entry point when someone accesses your server.
    HTTP_GET: This specifies the type of HTTP request that this handler will respond to. In this case, it's an HTTP GET request. GET requests are commonly used when a client wants to retrieve data from the server.
    [](AsyncWebServerRequest *request) {...}: This is a C++ lambda function. It's an anonymous function defined inline. The function takes one parameter, which is a pointer to an AsyncWebServerRequest object. This object represents the incoming HTTP request.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น •