Expand description
A backend-agnostic HTTP download layer.
This module defines a set of small traits — HttpClient,
HttpRequestBuilder, HttpResponse, and HttpHeaders — that abstract
over any HTTP client implementation (for example the reqwest wrapper in
the reqwest module). On top of them it provides:
HttpPuller: afast_pull::Pullerthat streams bytes over HTTP, with range support and file-identity (resumability) checks.Prefetch: resolves acrate::UrlInfofor a URL via a prefetch request.ContentDisposition: parses theContent-Dispositionheader for filenames.manual_redirect: RFC 9110-awareReferercomputation for redirect following.HttpError: the error type produced by this layer.
Most users do not use these types directly; instead they use
FastDownPuller (from the fast-puller feature), which wraps
HttpPuller with a smart-redirecting reqwest client.
Re-exports§
pub use manual_redirect::*;
Modules§
- manual_
redirect - Manual redirect handling that respects the
Referrer-Policyheader.
Structs§
- Content
Disposition - Parsed
Content-Dispositionheader, extracting thefilenameparameter. - Http
Puller - A
Pullerimplementation that fetches data over HTTP.
Enums§
- Http
Error - Errors that can occur during HTTP download operations.
Traits§
- Http
Client - Abstraction over an HTTP client that can send GET requests with optional byte-range headers.
- Http
Headers - Abstraction over HTTP response headers, providing typed get-by-name access.
- Http
Request Builder - Abstraction over an HTTP request builder that can be sent to produce a response.
- Http
Response - Abstraction over an HTTP response that provides headers, final URL, and chunked body reading.
- Prefetch
- Trait for fetching resource metadata (size, filename, range support) from a URL.
Type Aliases§
- GetChunk
Error - Projected chunk error type for a given client.
- GetHeader
- Projected headers type for a given client.
- GetHeader
Error - Projected header-get error type for a given client.
- GetRequest
Builder - Projected
HttpClient::RequestBuildertype for a given client. - GetRequest
Error - Projected request error type for a given client.
- GetResponse
- Projected
HttpResponsetype for a given request builder. - Prefetch
Result - Result of a prefetch operation: the metadata (
UrlInfo) and the initial HTTP response.