Sync from fork #1
@@ -95,6 +95,7 @@ std::expected<std::string, std::string> webserver_get_query(httpd_req_t *req)
|
|||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
std::string toString(httpd_ws_type_t val)
|
std::string toString(httpd_ws_type_t val)
|
||||||
{
|
{
|
||||||
switch (val)
|
switch (val)
|
||||||
@@ -109,6 +110,7 @@ std::string toString(httpd_ws_type_t val)
|
|||||||
ESP_LOGW(TAG, "Unknown httpd_ws_type_t(%i)", std::to_underlying(val));
|
ESP_LOGW(TAG, "Unknown httpd_ws_type_t(%i)", std::to_underlying(val));
|
||||||
return std::format("Unknown httpd_ws_type_t({})", std::to_underlying(val));
|
return std::format("Unknown httpd_ws_type_t({})", std::to_underlying(val));
|
||||||
}
|
}
|
||||||
|
#endif // CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
|
||||||
} // namespace esphttpdutils
|
} // namespace esphttpdutils
|
||||||
|
|
||||||
|
@@ -26,6 +26,8 @@ esp_err_t webserver_resp_send(httpd_req_t *req, ResponseStatus error, const char
|
|||||||
|
|
||||||
std::expected<std::string, std::string> webserver_get_query(httpd_req_t *req);
|
std::expected<std::string, std::string> webserver_get_query(httpd_req_t *req);
|
||||||
|
|
||||||
|
#ifdef CONFIG_HTTPD_WS_SUPPORT
|
||||||
std::string toString(httpd_ws_type_t val);
|
std::string toString(httpd_ws_type_t val);
|
||||||
|
#endif // CONFIG_HTTPD_WS_SUPPORT
|
||||||
|
|
||||||
} // namespace esphttpdutils
|
} // namespace esphttpdutils
|
||||||
|
Reference in New Issue
Block a user