use hyper_tls::HttpsConnector; use hyper::{Client, Uri}; use std::str; #[tokio::main] async fn main() -> Result<(), Box> { let https = HttpsConnector::new(); let client = Client::builder().build::<_, hyper::Body>(https); let res = client.get(Uri::from_static("https://test.louis-vallat.xyz")).await?; println!("{}", res.status().as_u16()); let buf = hyper::body::to_bytes(res).await?; let s = str::from_utf8(&buf).unwrap(); println!("{:?}", s); Ok(()) }