Skip to main content

Module backend

Module backend 

Source
Expand description

HTTP transport abstraction.

The default backend is ReqwestBackend. Inject a custom HttpBackend via ClientBuilder::backend for tests or alternate transports.

Buffered responses use HttpBackend::execute. Streaming responses use HttpBackend::execute_stream (implemented by ReqwestBackend by default).

Structs§

HttpRequest
Prepared HTTP request passed to a backend.
HttpResponse
Raw HTTP response from a backend (fully buffered).
HttpStreamingResponse
Raw HTTP response with a streaming body from a backend.
RecordedRequest
Snapshot of a recorded HTTP request for assertions in tests.
RecordingBackend
Wraps an HttpBackend and records each executed request.
ReqwestBackend
Reqwest-backed HTTP backend.

Enums§

HttpBody
Request body encoding for the transport layer.
RecordedBodyKind
Kind of request body last observed (streaming bodies are not replayed).

Traits§

HttpBackend
Pluggable HTTP transport used by Client.