Registry / http-client / async-http-proxy

async-http-proxy

JSON →
library1.2.5rscratesunverified

Lightweight asynchronous HTTP proxy client library.

# Cargo.toml [dependencies] async-http-proxy = "1.2.5"
INSTALL
IMPORT
SIG · ASYNC-HTTP-PROXY
A
async-http-proxy
http-clientrustv1.2.5
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.

HttpProxy
use async_http_proxy::http_proxy::HttpProxy;

Creates an HTTP proxy and uses it with reqwest.

use async_http_proxy::http_proxy::HttpProxy; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let proxy = HttpProxy::new("http://proxy.example.com:8080"); let client = reqwest::Client::builder().proxy(proxy).build()?; let resp = client.get("http://example.com").send().await?; println!("{}", resp.status()); Ok(()) }
Debug
Known issues
gotchaRequires an async runtime like tokio
fix
Add tokio as a dependency and use #[tokio::main]
affects: >=1.0.0
Upgrade
Version history
1.2.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
36
Resources
async-http-proxy — cargo add async-http-proxy · libregistry