Rust

http

Module

Undocumented.

Contents

use utopia_client::Http;
Rust
pub struct Http

The HTTP/1.1 transport: TCP and TLS (rustls) on tokio.

Rust
use utopia_client::{Client, Http, Request};

let client = Client::new(Http::new()).with_timeout(10.0)?;
let response = client.send(Request::new("GET", "https://example.com/")?).await?;
println!("{} {}", response.status(), response.text());
Compiles in CI; needs a running service to execute.
Also implements Clone.