Skip to main content

Crate blocking_http

Crate blocking_http 

Source
Expand description

One blocking HTTP exchange, for callers on host request threads (the Hindsight client, the judge seat): a request, its status, its retry-after header and (for a 2xx answer) its body read up to a size limit, cancelled by a signal or a deadline. ReqwestTransport is the real one.

Structs§

HttpRequest
One request as the client builds it. headers are final (names lower-case, values validated).
HttpResponse
A status, its retry-after header (as sent, any status) and, for a 2xx status only, the whole body (empty when there is none). A non-2xx body is never read.
ReqwestTransport
reqwest with rustls on a private one-thread runtime, so blocking callers (host request threads) never run inside another runtime. No proxy (as Node’s fetch), no redirects, no decompression.

Enums§

TransportError

Traits§

Transport
Sends one request. A 2xx answer whose content-length (read as a JavaScript Number) exceeds max_bytes, or whose body grows past it, is TransportError::TooLarge; the deadline (timeout from the call) and the signal cover the whole exchange, body included.