Module http

Module http 

Source
Expand description

Reusable HTTP client with pre-configured TLS, timeouts, and user agent.

This module provides Client as the recommended base HTTP client for all network requests in the application. It is pre-configured with:

  • TLS using webpki-roots certificates (no system cert store required)
  • 30 second request timeout
  • User agent identifying the application

§Example

use cadmus_core::http::Client;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new()?;
    client.get("https://example.com").send()?;
    Ok(())
}

Structs§

Client
Pre-configured HTTP client for making network requests.

Enums§

HttpError

Constants§

CLIENT_TIMEOUT_SECS
USER_AGENT 🔒

Functions§

build_root_store 🔒