ESP32: Minimales httpd_uri_t-Beispiel (ESP-IDF)
English
Deutsch
Dieser httpd_uri_t-Handler antwortet einfach mit Hello World!:
esp32-minimal-httpd_uri_t-example-esp-idf.cpp
static const httpd_uri_t rootHandler = {
.uri = "/",
.method = HTTP_GET,
.handler = [](httpd_req_t *req) {
httpd_resp_set_type(req, "text/html");
httpd_resp_send(req, "<h1>Hello World!</h1>", HTTPD_RESP_USE_STRLEN);
return ESP_OK;
}
};Check out similar posts by category:
C/C++, ESP8266/ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow