Expand description
HTTP/1.1 request serialization and response parsing (status line, headers, and body framing: Content-Length, chunked transfer-encoding, or EOF-delimited).
Structs§
- Response
- A parsed HTTP response.
Constants§
- DEFAULT_
MAX_ RESPONSE_ BYTES - Default ceiling on the total bytes buffered while parsing one response (status line + headers + body). A response — or a malicious/compromised peer trickling bytes — that exceeds this is rejected rather than allowed to drive unbounded allocation. Matches the transport-layer frame cap (16 MiB) scaled up for whole HTTP responses.
Functions§
- read_
response - Parse a full HTTP response from
stream.is_headsuppresses body reading. - write_
request - Serialize and write an HTTP/1.1 request, then flush.