()
| 922 | } |
| 923 | |
| 924 | fn build_http_client() -> Result<Client, String> { |
| 925 | Client::builder() |
| 926 | .timeout(Duration::from_secs(20)) |
| 927 | .redirect(reqwest::redirect::Policy::limited(10)) |
| 928 | .user_agent("clawd-rust-tools/0.1") |
| 929 | .build() |
| 930 | .map_err(|error| error.to_string()) |
| 931 | } |
| 932 | |
| 933 | fn normalize_fetch_url(url: &str) -> Result<String, String> { |
| 934 | let parsed = reqwest::Url::parse(url).map_err(|error| error.to_string())?; |
no test coverage detected