Add timeouts to HTTP requests (#3908)

This commit is contained in:
iequidoo
2023-01-11 11:55:42 -03:00
committed by iequidoo
parent 6642083f52
commit 6d9d31cad1
6 changed files with 25 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ pub async fn read_url(context: &Context, url: &str) -> anyhow::Result<String> {
}
pub async fn read_url_inner(context: &Context, url: &str) -> anyhow::Result<String> {
let client = reqwest::Client::new();
let client = crate::http::get_client()?;
let mut url = url.to_string();
// Follow up to 10 http-redirects