Skip to main content

Module http

Module http 

Source
Expand description

HTTP transport abstraction.

Provides a trait-based abstraction over HTTP clients, enabling transparent switching between direct reqwest calls and the Ghola sidecar proxy for stealth analysis.

§HTTP Transport Abstraction

Provides a trait-based abstraction over HTTP clients, allowing transparent switching between direct reqwest calls and the Ghola sidecar proxy.

§Usage

use scope::http::{HttpClient, NativeHttpClient, Request};

let client = NativeHttpClient::new()?;
let resp = client.send(Request::get("https://api.example.com/data")).await?;
println!("status={}, body_len={}", resp.status_code, resp.body.len());

When the Ghola sidecar is enabled via config.yaml, the same HttpClient interface routes requests through 127.0.0.1:18789, adding temporal drift, ghost signing, and chain-aware headers.

Re-exports§

pub use ghola::GholaHttpClient;
pub use native::NativeHttpClient;

Modules§

ghola
Ghola sidecar HTTP client.
native
Native HTTP client using reqwest directly.

Structs§

Request
Generic HTTP request passed through the transport abstraction.
Response
Generic HTTP response returned by any transport implementation.

Traits§

HttpClient
Trait implemented by both the native reqwest client and the ghola sidecar client. Scope selects the implementation at startup based on the ghola.enabled flag in config.yaml.