Expand description
The HTTP layer of the client.
The HttpBackend trait defines the minimal contract for sending a single HTTP
request and receiving a response. It is the replaceable component of the client:
the default implementation ReqwestBackend uses reqwest, but a custom
backend (e.g. for testing or for a different runtime) can be plugged in via
ApifyClientBuilder::http_backend.
HttpClient wraps a backend and adds the cross-cutting concerns shared by every
endpoint: authentication, the User-Agent header, query-parameter serialization,
timeouts and retries with exponential backoff (mirroring the JavaScript and Python
reference clients).
Structs§
- Http
Client - The orchestrating HTTP client shared by every resource client.
- Http
Request - A fully-resolved HTTP request, ready to be sent by an
HttpBackend. - Http
Response - An HTTP response returned by an
HttpBackend. - Reqwest
Backend - The default
HttpBackendimplementation, backed byreqwest. - Retry
Config - Configuration for the retry/timeout behaviour of the
HttpClient.
Enums§
- Http
Method - HTTP method of a request.
Traits§
- Http
Backend - The replaceable transport contract.