Skip to main content

Module http

Module http 

Source
Expand description

Shared HTTP client construction for the registry clients.

Every ecosystem registry (npm, crates.io, PyPI, GitHub) builds a reqwest::Client with the same timeout and user-agent. Centralising the builder here keeps that configuration in one place; the concurrency ceiling is exposed as a constant because each registry wraps the client in its own tokio::sync::Semaphore.

Constants§

DEFAULT_MAX_CONCURRENT_REQUESTS
Default ceiling on concurrent in-flight registry requests.
DEFAULT_REQUEST_TIMEOUT_SECS
Default per-request timeout, in seconds.

Functions§

build_client
Build the shared reqwest::Client used by every registry.