use reqwest::Client;
use std::time::Duration;
pub const INTERNAL_CRAWLER_UA: &str = "Mozilla/5.0 (compatible; IndexFlowBot/1.0; +https://www.indexflowing.com)";
pub fn build_http_client() -> anyhow::Result<Client> {
Client::builder()
.connect_timeout(Duration::from_secs(15))
.timeout(Duration::from_secs(60)) .user_agent(INTERNAL_CRAWLER_UA)
.redirect(reqwest::redirect::Policy::limited(5))
.build()
.map_err(|e| anyhow::anyhow!("failed to build HTTP client: {e}"))
}