Skip to main content

build_fetch_client

Function build_fetch_client 

Source
pub fn build_fetch_client(
    config: &HttpStackConfig,
) -> Result<FetchHttpClient, HttpStackError>
Expand description

Builds a fetch client from an HttpStackConfig.

Reuses the same ProxyConfig and default user agent. transport_retries / total_timeout / initial_backoff do not apply directly in the fetch path — fetch timeouts are determined per-call by HttpRequest::timeout, and retries are left to the caller (HttpClient does not retry, to avoid silently doubling traffic for GET requests with side effects).

§Errors

Returns HttpStackError if the connector fails to build (e.g. TLS root loading, proxy URL parsing).