1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! HTTP client infrastructure for `ToolKit`
//!
//! This crate provides a hyper-based HTTP client with:
//! - Automatic TLS via rustls; transport security is configurable via
//! [`TransportSecurity`] — defaults to
//! `TlsOnly` (HTTPS-only) under `--features fips`, `AllowInsecureHttp` otherwise
//! - Connection pooling
//! - Configurable timeouts
//! - Automatic retries with exponential backoff
//! - User-Agent header injection
//! - Concurrency limiting
//! - **Transparent response decompression** (gzip, brotli, deflate)
//! - Optional OpenTelemetry tracing (feature-gated)
//!
//! # Transparent Decompression
//!
//! The client automatically:
//! - Sends `Accept-Encoding: gzip, br, deflate` header on all requests
//! - Decompresses response bodies based on `Content-Encoding` header
//! - Applies body size limits to **decompressed** bytes (protecting against zip bombs)
//!
//! No configuration is required; decompression is always enabled.
//!
//! # Example
//!
//! ```ignore
//! use toolkit_http::{HttpClient, HttpClientBuilder};
//! use std::time::Duration;
//!
//! let client = HttpClient::builder()
//! .timeout(Duration::from_secs(10))
//! .user_agent("my-app/1.0")
//! .build()?;
//!
//! // reqwest-like API: response has body-reading methods
//! // Compressed responses are automatically decompressed
//! let data: MyData = client
//! .get("https://example.com/api")
//! .send()
//! .await?
//! .json()
//! .await?;
//! ```
/// Builder for configuring and constructing the HTTP client.
/// The HTTP client implementation.
/// Client configuration types.
/// Error types returned by the HTTP client.
/// Request builder types.
/// Response types with body-size-limited readers.
pub use HttpClientBuilder;
pub use HttpClient;
/// TLS building blocks shared with other transport crates (e.g. the upstream
/// proxy engine) so every outbound `ClientConfig` goes through the same
/// provider selection and FIPS hardening.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use TlsConfigError;
pub use ;