DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
http_client.h File Reference

Zero-heap outbound HTTP(S) client over raw lwIP (DETWS_ENABLE_HTTP_CLIENT). More...

#include "ServerConfig.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Detailed Description

Zero-heap outbound HTTP(S) client over raw lwIP (DETWS_ENABLE_HTTP_CLIENT).

A blocking client for issuing requests from the device: webhooks, telemetry push, REST calls. Split, like the other services, into a pure host-testable core and an ESP32-only transport:

  • http_client_parse_url() / http_client_build_request() / http_client_parse_response() are pure string functions, unit-tested on the host (env:native_http_client).
  • http_get() / http_post() resolve the host (DNS), open a raw lwIP TCP connection (https:// via client-side mbedTLS over the shared static arena), send the request, and fill the result from a fixed BSS receive buffer. No heap; one request at a time (single-task device).

Response bodies are delimited by Content-Length or by connection close; chunked transfer-decoding is applied when present. The body is returned by pointer into the client's static buffer (valid until the next call).

Definition in file http_client.h.