Registry / http-client / hyper-proxy

hyper-proxy

JSON →
library0.9.1rscratesunverified

A proxy connector for Hyper-based HTTP applications.

# Cargo.toml [dependencies] hyper-proxy = "0.9.1"
INSTALL
IMPORT
SIG · HYPER-PROXY
H
hyper-proxy
http-clientrustv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ProxyConnector
use hyper_proxy::ProxyConnector;

Creates an HTTP client that routes requests through a proxy.

use hyper_proxy::{ProxyConnector, Intercept, Proxy}; use hyper::Client; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let proxy = Proxy::new(Intercept::All, "http://proxy.example.com:8080".parse()?); let connector = ProxyConnector::from_proxy(proxy); let client = Client::builder().build(connector); let resp = client.get("http://example.com".parse()?).await?; println!("Status: {}", resp.status()); Ok(()) }
Debug
Known issues
gotchaRequires an async runtime (e.g., Tokio) and the `hyper` crate.
fix
Add `tokio` with the `rt-multi-thread` feature and `hyper` with `client` and `http1` features.
affects: >=0.0.0
Upgrade
Version history
0.9.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
1
Resources
hyper-proxy — cargo add hyper-proxy · libregistry