httpclient 0.26.1

HTTP client with middleware. Middleware provides composable support for record/replay, logging, exponential backoff, and more.
Documentation
1
2
3
4
5
6
7
8
9
use httpclient::InMemoryResponseExt;

#[tokio::main]
async fn main() {
    let client = httpclient::Client::new().with_middleware(httpclient::middleware::Recorder::new());
    let res = client.get("https://www.jsonip.com/").header("secret", "foo").await.unwrap();
    let res = res.text().unwrap();
    println!("{}", res);
}