ugi 0.2.1

Runtime-agnostic Rust request client with HTTP/1.1, HTTP/2, HTTP/3, H2C, WebSocket, SSE, and gRPC support
Documentation
use futures_lite::future::block_on;
use serde::Deserialize;

#[derive(Debug, Deserialize)]
struct User {
    id: u64,
    name: String,
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
    block_on(async move {
        let client = ugi::Client::builder().bearer_auth("token")?.build()?;

        let res = client.get("https://api.example.com/users/1").await?;

        let user: User = res.json().await?;
        println!("user#{} {}", user.id, user.name);
        Ok(())
    })
}