Creates an HTTP client configured with appropriate headers and compression
()
| 30 | |
| 31 | /// Creates an HTTP client configured with appropriate headers and compression |
| 32 | pub fn default_http_client() -> Result<Client> { |
| 33 | let mut headers = HeaderMap::new(); |
| 34 | headers.insert(USER_AGENT, HeaderValue::from_static(USER_AGENT_STRING)); |
| 35 | let client = Client::builder().default_headers(headers).gzip(true).brotli(true).build()?; |
| 36 | Ok(client) |
| 37 | } |
| 38 | |
| 39 | /// Finds the workspace root and returns the cache directory path |
| 40 | /// |