Skip to main content

Module client

Module client 

Source
Expand description

HTTP client implementations for making requests.

This module provides two client types for different use cases:

  • Fetcher – A stateless client that creates a fresh wreq client for every request. This is the simplest option and works well when you do not need to persist cookies or connection state between requests.

  • FetcherSession – A session-based client that maintains a persistent wreq client with an automatic cookie jar. Use this when you need to log in to a site and carry cookies across subsequent requests. Call open() before making requests and close() when done.

Both clients support automatic retries, proxy rotation, browser impersonation, and per-request configuration overrides via RequestConfig.

Structs§

Fetcher
Stateless async HTTP fetcher that creates a new wreq client per request.
FetcherSession
Session-based async HTTP fetcher that reuses a persistent client with cookie storage.
RequestConfig
Per-request configuration overrides that take precedence over FetcherConfig defaults.