Co-authored-by: Danny Browning <danny.browning@protectwise.com> Co-authored-by: Daniel Eades <danieleades@hotmail.com>
17 lines
313 B
Rust
17 lines
313 B
Rust
#![deny(warnings)]
|
|
|
|
use reqwest::r#async::Client;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), reqwest::Error> {
|
|
let mut res = Client::new().get("https://hyper.rs").send().await?;
|
|
|
|
println!("Status: {}", res.status());
|
|
|
|
let body = res.text().await?;
|
|
|
|
println!("Body:\n\n{}", body);
|
|
|
|
Ok(())
|
|
}
|