Skip to main content

Crate aioduct

Crate aioduct 

Source
Expand description

Async-native HTTP client built directly on hyper 1.x.

aioduct is runtime-agnostic: enable tokio, smol, or compio via feature flags. For HTTPS, enable the rustls feature.

Re-exports§

pub use bandwidth::BandwidthLimiter;
pub use body::BodyStream;
pub use body::RequestBody;
pub use cache::CacheConfig;
pub use cache::CacheEntry;
pub use cache::CacheStore;
pub use cache::HttpCache;
pub use cache::InMemoryCacheStore;
pub use cookie::Cookie;
pub use cookie::CookieJar;
pub use cookie::SameSite;
pub use error::AioductBody;
pub use error::Error;
pub use forwarded::ForwardedElement;
pub use hsts::HstsStore;
pub use http2::Http2Config;
pub use middleware::Middleware;
pub use multipart::Multipart;
pub use multipart::Part;
pub use netrc::Netrc;
pub use netrc::NetrcMiddleware;
pub use proxy::NoProxy;
pub use proxy::ProxyConfig;
pub use proxy::ProxySettings;
pub use redirect::RedirectAction;
pub use redirect::RedirectPolicy;
pub use retry::RetryBudget;
pub use retry::RetryConfig;
pub use sse::SseDecoder;
pub use sse::SseEvent;
pub use sse::SseMessage;
pub use sse::SseStream;
pub use throttle::RateLimiter;
pub use timing::RequestTimings;
pub use problem::ProblemDetails;
pub use chunk_download::ChunkDownload;
pub use client::Client;
pub use forward::ForwardBuilder;
pub use hickory::HickoryResolver;
pub use request::RequestBuilder;
pub use response::Response;
pub use runtime::Resolve;
pub use runtime::Runtime;
pub use upgrade::Upgraded;
pub use tls::TlsInfo;
pub use tls::TlsVersion;
pub use tls::Certificate;
pub use tls::Identity;

Modules§

bandwidth
Token-bucket bandwidth limiter for throttling download throughput.
blocking
Blocking (synchronous) HTTP client wrapper.
body
Request and response body types.
cache
HTTP response caching with conditional validation.
chunk_download
Parallel range-request file downloader.
client
HTTP client with connection pooling and redirect handling.
connector
Tower-based connector layer support.
cookie
Cookie storage and automatic cookie handling.
error
Error types for HTTP operations.
forward
Request forwarding for proxy/gateway use cases. Request forwarding for proxy/gateway use cases.
forwarded
Forwarded header builder and parser (RFC 7239).
h3_transport
HTTP/3 transport layer using QUIC.
hickory
Hickory DNS resolver integration.
hsts
HSTS (HTTP Strict Transport Security) store.
http2
HTTP/2 connection configuration.
link
Link header parsing (RFC 8288).
middleware
Request/response middleware trait and stack.
multipart
Multipart/form-data request body builder.
netrc
Netrc credential file parsing and middleware.
problem
RFC 9457 Problem Details for HTTP APIs.
proxy
HTTP and SOCKS proxy configuration.
redirect
Redirect policy configuration.
request
Request builder for configuring and sending HTTP requests.
response
HTTP response type with status, headers, and body.
retry
Automatic retry with exponential backoff.
runtime
Async runtime abstraction layer.
sse
Server-Sent Events (SSE) stream parser.
throttle
Token-bucket rate limiter for throttling requests.
timing
Per-request timing breakdown (DNS, TCP, TLS, TTFB).
tls
TLS configuration and connector types.
upgrade
HTTP upgrade (e.g., WebSocket) support.
wasi_p2
WASI Preview 2 HTTP client using wasi:http/outgoing-handler. WASI Preview 2 HTTP client using wasi:http/outgoing-handler.
wasm
WebAssembly (browser) runtime support.

Structs§

HeaderMap
A specialized multimap for header names and values.
Method
The Request Method (VERB)
OtelMiddleware
OpenTelemetry middleware that propagates trace context and records HTTP semantic convention attributes on the current span.
Protocol
Extension type representing the :protocol pseudo-header in HTTP/2.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
TracingMiddleware
Middleware that emits tracing events for HTTP request lifecycle.
Uri
The URI component of a request.
Version
Represents a version of the HTTP spec.