Expand description
HTTP-over-TCP transport for the same NDJSON frame shapes the Unix
socket crate::server speaks.
Plaintext HTTP/1.1 only — TLS termination is the operator’s concern.
Wire shape:
- request:
POST /with a JSON body matchingRequest; any other method or path returns405/404. - one-shot reply:
200 OK+Content-Type: application/json+ a singleResponsebody. - streaming reply:
200 OK+Content-Type: application/x-ndjson+ one JSONResponseframe per chunk, terminated by anEndframe. The client cancels by closing the TCP connection.
Auth: Authorization: Bearer <token>, constant-time compared
against the configured token via the subtle crate. Boot
validation (e.g. “anonymous access only on loopback”) lives in the
caller.
Structs§
Enums§
Functions§
- spawn_
http_ server - Spawn one accept loop per bind address. Returns the spawned task
handles; each task runs until
cancelfires or the listener errors fatally.