14#if DETWS_ENABLE_PARTITION_MONITOR
21struct PartitionRoutesCtx
25static PartitionRoutesCtx s_partr;
27static void partition_handler(uint8_t slot_id,
HttpReq *req)
33 detws_partition_json(parts, n, buf,
sizeof(buf));
35 s_partr.srv->send(slot_id, 200, DET_MIME_JSON, buf);
38void detws_partition_monitor_begin(
DetWebServer &server,
const char *path)
40 s_partr.srv = &server;
#define DETWS_PARTITION_MAX
Maximum partitions the monitor reports (BSS table).
#define DETWS_PARTITION_JSON_BUF
Stack buffer for the partition-map JSON (bytes).
Single-port HTTP server with deterministic, zero-allocation execution.
void on(const char *path, HttpMethod method, Handler callback)
Register a route handler.
Layer 7 (Application) - public HTTP routing API.
HttpMethod
HTTP request methods supported by the router.
@ HTTP_GET
Safe, idempotent read.
Shared HTTP Content-Type ("MIME") string constants (one source of truth).
Flash partition-map monitor (DETWS_ENABLE_PARTITION_MONITOR).
Fully-parsed HTTP/1.1 request.