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§
- Http
Request - Prepared HTTP request passed to a backend.
- Http
Response - Raw HTTP response from a backend (fully buffered).
- Http
Streaming Response - Raw HTTP response with a streaming body from a backend.
- Recorded
Request - Snapshot of a recorded HTTP request for assertions in tests.
- Recording
Backend - Wraps an
HttpBackendand records each executed request. - Reqwest
Backend - Reqwest-backed HTTP backend.
Enums§
- Http
Body - Request body encoding for the transport layer.
- Recorded
Body Kind - Kind of request body last observed (streaming bodies are not replayed).
Traits§
- Http
Backend - Pluggable HTTP transport used by
Client.