openwire 0.1.0

OkHttp-inspired async HTTP client for Rust built on hyper and tower
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use http::Request;
use openwire::{Client, RequestBody};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::builder().build()?;
    let request = Request::builder()
        .uri("http://example.com/")
        .body(RequestBody::empty())?;
    let response = client.execute(request).await?;
    println!("status = {}", response.status());
    Ok(())
}