A minimal, backend-agnostic HTTP client abstraction used across the workspace
(e.g. by download-manager) so callers depend on a
small HttpClient trait instead of a specific HTTP library.
HttpClient— trait for sending anhttp::Request<Vec<u8>>and getting back anhttp::Responsewith an async, streamable body (Body).MockClient— an in-memory implementation for tests.ReqwestClient(featurereqwest, enabled by default) — a real backend built onreqwest.
use http_client::{HttpClient, ReqwestClient};
use http::Request;
let client = ReqwestClient::new()?;
let request = Request::get("https://example.com").body(Vec::new())?;
let response = client.send(request).await?;
# Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())