|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Layer 7 - the user agent (RFC 9110 sec 3.5): one outbound HTTP/1.1 message exchange. More...
#include "protocore_config.h"Go to the source code of this file.
Layer 7 - the user agent (RFC 9110 sec 3.5): one outbound HTTP/1.1 message exchange.
RFC 9110 sec 3.5: "the term 'user agent' refers to any of the various client programs that initiate a request." This is that side of HTTP. The serving side is network_drivers/presentation/http.
The exchange runs in three steps, each a call on ::HttpClient:
Those three touch no socket and are unit-tested on the host. HttpClientNs::get and HttpClientNs::post run all three over the shared outbound transport (::TcpClient), with the TLS record layer under them for an https target URI (RFC 9112 sec 9.7).
The content is returned by pointer into the module's receive buffer and is valid until the next call. One exchange at a time: the module holds one connection and one buffer.
Definition in file http_client.h.