Expand description
HTTP/1.1 as pure functions, with no input or output (doc 19a, section 18.10.3): building the request,
interpreting the response (Content-Length, chunked or until the connection ends) and reading the address.
The transport (TCP, TLS) only carries bytes back and forth.
Structs§
Enums§
Constants§
- MAX_
BODY - Cap on a response body: a batch of large base64 messages fits with room to spare.
Functions§
- build_
target - Path plus query (
/topics/x/messages?maxMessages=2). The path segments already come encoded by the caller. - encode_
request - The request bytes. Adds
Host,Content-LengthandConnection: close. - percent_
encode - Encodes a query component: only
A-Za-z0-9-._~passes as is. - read_
response - Reads a complete response.
1xxresponses are skipped.