|
DeterministicESPAsyncWebServer v6.28.0
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Optional authenticated OTA firmware update (DETWS_ENABLE_OTA). More...
#include "ServerConfig.h"Go to the source code of this file.
Functions | |
| void | detws_ota_begin (DetWebServer &server, const char *path, const char *user, const char *pass) |
| Register an authenticated streaming OTA endpoint. | |
Optional authenticated OTA firmware update (DETWS_ENABLE_OTA).
Registers a POST endpoint that streams a firmware image straight into the ESP32 Update API via the parser's streaming-body hook (http_parser_set_stream_hooks), so the image never has to fit in RAM. On a successful flash the device responds and reboots into the new firmware. Compiled to a no-op stub when DETWS_ENABLE_OTA is 0 or off-Arduino.
Definition in file ota_service.h.
| void detws_ota_begin | ( | DetWebServer & | server, |
| const char * | path, | ||
| const char * | user, | ||
| const char * | pass | ||
| ) |
Register an authenticated streaming OTA endpoint.
Call after begin(). A POST @p path carrying a raw firmware image and valid HTTP Basic credentials is streamed into Update; on success the device replies 200 and reboots. Unauthorized or failed uploads get 401 / 400.
| server | The running server (the route + stream hooks are installed on it). |
| path | URL to accept the upload on (e.g. "/update"). Persistent string. |
| user | Required HTTP Basic username. |
| pass | Required HTTP Basic password. |
Definition at line 134 of file ota_service.cpp.