Files
rss-reader/src/reader/scraper/content.rs
T
2026-06-12 19:22:07 +02:00

10 lines
323 B
Rust

use super::super::net::safe_fetch;
use crate::error::AppError;
// Do a request for the given URL, with a minimum time between requests
// to avoid overloading the server.
pub async fn do_throttled_request(url: &str) -> Result<String, AppError> {
let response = safe_fetch(url).await?;
Ok(response.text().await?)
}