client.rs
1use futures::AsyncReadExt as _;
2use http_client::AsyncBody;
3use http_client::HttpClient;
4use reqwest_client::ReqwestClient;
5
6#[tokio::main]
7async fn main() {
8 let resp = ReqwestClient::new()
9 .get("http://zed.dev", AsyncBody::empty(), true)
10 .await
11 .unwrap();
12
13 let mut body = String::new();
14 resp.into_body().read_to_string(&mut body).await.unwrap();
15 println!("{}", &body);
16}