BaseHttpClient
Hierarchy
- BaseHttpClient
Index
Methods
Methods
__init__
Initialize the base HTTP client.
Parameters
optionalkeyword-onlytoken: str | None = None
Apify API token for authentication.
optionalkeyword-onlytimeout: timedelta = DEFAULT_TIMEOUT
Request timeout.
optionalkeyword-onlymax_retries: int = DEFAULT_MAX_RETRIES
Maximum number of retries for failed requests.
optionalkeyword-onlymin_delay_between_retries: timedelta = DEFAULT_MIN_DELAY_BETWEEN_RETRIES
Minimum delay between retries.
optionalkeyword-onlystatistics: ClientStatistics | None = None
Statistics tracker for API calls. Created automatically if not provided.
optionalkeyword-onlyheaders: dict[str, str] | None = None
Additional HTTP headers to include in all requests.
Returns None
Base class for HTTP clients with shared configuration and utilities.
Subclasses should call
super().__init__()and create their specific impit client using the_headersattribute.