1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use std::fmt::Error; use url::Url; pub async fn execute( url: &Url ) -> Result<String, Error> { let html = reqwest::get(url.as_str()) .await .expect("Failed making get request") .text() .await .expect("Failed extracting text"); Ok(html) }