Skip to content

Commit b2da76d

Browse files
committed
print image url
1 parent a60cfdb commit b2da76d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
88
.await?
99
.json::<HashMap<String, String>>()
1010
.await?;
11+
let img_url = &resp["image"];
1112

12-
let img_bytes = reqwest::get(&resp["image"]).await?.bytes().await?;
13+
let img_bytes = reqwest::get(img_url).await?.bytes().await?;
1314
let img = load_from_memory(&img_bytes)?;
1415

1516
let conf = Config {
@@ -18,5 +19,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
1819
};
1920
print(&img, &conf)?;
2021

22+
println!("{}", img_url);
23+
2124
Ok(())
2225
}

0 commit comments

Comments
 (0)