From a14274a11541ab5f69ab4f5b3b38f1e31059d251 Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Sat, 13 May 2023 15:15:06 -0400 Subject: [PATCH] Use thecatapi.com. --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 79d3e82..d3c6cab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,9 @@ #[tokio::main] async fn main() { - println!("Meow!"); + let res = reqwest::get("https://api.thecatapi.com/v1/images/search") + .await + .unwrap(); + println!("Status: {}", res.status()); + let body = res.text().await.unwrap(); + println!("Body: {}", body); }