pub struct HttpConfig {
pub timeout: Duration,
pub stream_timeout: Duration,
pub connect_timeout: Duration,
pub idle_timeout: Duration,
pub min_throughput: u64,
pub max_retries: u32,
pub max_response_bytes: u64,
}Expand description
Settings.
No timeout covers a whole response body: a large or slow body takes as
long as it takes while bytes keep arriving, and fails once none arrive for
idle_timeout.
Fields§
§timeout: DurationThe wait for Transport::send’s response headers, request body
included (plus body / min_throughput for a large request body).
stream_timeout: DurationThe wait for Transport::open’s response headers: a streaming API
may think for a while before its first byte.
connect_timeout: DurationConnection establishment (TCP, TLS and any proxy CONNECT).
idle_timeout: DurationThe longest a response body may deliver no bytes, whole or streamed.
min_throughput: u64The slowest request-body upload rate tolerated, in bytes per second:
it extends the header wait by body / min_throughput. Must not be zero.
max_retries: u32Retries after the first attempt (per the request’s Retry policy).
max_response_bytes: u64Largest body accepted, whole or streamed.