|
Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
|
HTTP routes of the WiFi setup page and its JSON API. More...
#include <esp_http_server.h>Go to the source code of this file.
Functions | |
| void | register_wifi_routes (httpd_handle_t server, WifiManager &wifi) |
Registers /wifi, /api/wifi/status|scan|saved, POST /api/wifi/add|forget and the catch-all GET /*. | |
HTTP routes of the WiFi setup page and its JSON API.
| void register_wifi_routes | ( | httpd_handle_t | server, |
| WifiManager & | wifi ) |
Registers /wifi, /api/wifi/status|scan|saved, POST /api/wifi/add|forget and the catch-all GET /*.
The server must use httpd_uri_match_wildcard, and this must be called after every other route: the catch-all matches anything, so exact routes registered earlier win. In setup mode the catch-all answers 302 to http://192.168.4.1/wifi (phone captive-portal probes request arbitrary hostnames), otherwise 404. Only POSTs are origin-checked. Passwords and PINs are never logged or returned.
| server | Running httpd instance. |
| wifi | Manager the handlers read and update; must outlive the server. |