esphome/esphome/components/web_server_idf/utils.h
dentra c899a33d1a
web_server_idf: support x-www-form-urlencoded POST requests (#6037)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 13:09:36 +13:00

18 lines
519 B
C++

#pragma once
#ifdef USE_ESP_IDF
#include <esp_http_server.h>
#include "esphome/core/helpers.h"
namespace esphome {
namespace web_server_idf {
bool request_has_header(httpd_req_t *req, const char *name);
optional<std::string> request_get_header(httpd_req_t *req, const char *name);
optional<std::string> request_get_url_query(httpd_req_t *req);
optional<std::string> query_key_value(const std::string &query_url, const std::string &key);
} // namespace web_server_idf
} // namespace esphome
#endif // USE_ESP_IDF