Expand description
Transport-independent HTTP requests, lazy response bodies, and errors.
use rig_http::http_client::{HeaderMap, bearer_auth_header};
let mut headers = HeaderMap::new();
bearer_auth_header(&mut headers, "example-token")?;Modules§
- framing
- Incremental SSE and newline-delimited framing of response bytes.
SSE dispatch requires a blank line; incomplete events are not flushed at EOF.
NDJSON permits a final unterminated line through
NdjsonFramer::finish. - middleware
- Transport-boundary middleware for
DynHttpClient. Attach hooks withwith_middleware. - multipart
- Transport-neutral multipart fields and byte encoding.
Structs§
- Builder
- An HTTP request builder
- DynHttp
Client - A type-erased, cheaply cloneable HTTP transport.
- Header
Map - A specialized multimap for header names and values.
- Header
Value - Represents an HTTP header field value.
- Method
- The Request Method (VERB)
- Multipart
Form - Generic multipart form data container
- NoBody
- Request
- Represents an HTTP request.
- Response
- Represents an HTTP response
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Uri
- The URI component of a request.
Enums§
Traits§
- Http
Client Ext - An HTTP client Rig sends through: unary, multipart and streaming requests.
- Http
Middleware - Transport-boundary hooks applied by
DynHttpClientaround every request.
Functions§
Type Aliases§
- Boxed
Stream - The body of a streaming response: the transport’s own chunks, boxed.
- Lazy
Body - Lazy
Bytes - Result
- Streaming
Response