pub struct Client {
pub cookie_store: Arc<RwLock<CookieStore>>,
/* private fields */
}Expand description
A stateful, pooling HTTP client that enforces Chrome transport identity.
The Client is the primary entry point for the http-quik library. It manages:
- Connection Pooling: Reuses established HTTP/2 sessions to maintain persistent fingerprints.
- Cookie Persistence: A synchronized cookie jar shared across all requests.
- Stealth Redirects: Automatically follows redirects while mutating headers and methods to match Chromium’s behavioral markers.
- OS Auto-Detection: Defaults to a Chrome profile matched to the host OS, ensuring consistency between the TLS/H2 persona and the kernel’s TCP stack.
§Example
use http_quik::Client;
let client = Client::new();Fields§
A synchronized cookie jar shared across all requests.
This store is thread-safe and is automatically updated during redirect chains and standard request execution.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new Client with a Chrome 134 profile auto-matched to the host OS.
The profile is selected at compile time to ensure consistency between
the TLS/H2 persona and the host kernel’s TCP stack.
For custom profiles or proxies, use Client::builder.
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a ClientBuilder to configure a specialized Client instance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more