Files
reqwest-impersonate/examples/simple.rs
Sean McArthur 87a09322d6 Make the async Client default (#626)
The previously default Client is moved to `reqwest::blocking`, while the
async client becomes the main API.

Closes #622
2019-09-09 17:20:51 -07:00

18 lines
318 B
Rust

#![deny(warnings)]
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let mut res = reqwest::Client::new()
.get("https://hyper.rs")
.send()
.await?;
println!("Status: {}", res.status());
let body = res.text().await?;
println!("Body:\n\n{}", body);
Ok(())
}