Skip to main content

Module http

Module http 

Source
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:

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-Policy header.

Structs§

ContentDisposition
Parsed Content-Disposition header, extracting the filename parameter.
HttpPuller
A Puller implementation that fetches data over HTTP.

Enums§

HttpError
Errors that can occur during HTTP download operations.

Traits§

HttpClient
Abstraction over an HTTP client that can send GET requests with optional byte-range headers.
HttpHeaders
Abstraction over HTTP response headers, providing typed get-by-name access.
HttpRequestBuilder
Abstraction over an HTTP request builder that can be sent to produce a response.
HttpResponse
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§

GetChunkError
Projected chunk error type for a given client.
GetHeader
Projected headers type for a given client.
GetHeaderError
Projected header-get error type for a given client.
GetRequestBuilder
Projected HttpClient::RequestBuilder type for a given client.
GetRequestError
Projected request error type for a given client.
GetResponse
Projected HttpResponse type for a given request builder.
PrefetchResult
Result of a prefetch operation: the metadata (UrlInfo) and the initial HTTP response.