MCPcopy Create free account
hub / github.com/csskit/csskit / default_http_client

Function default_http_client

crates/csskit_spec_generator/src/fetch_cached.rs:32–37  ·  view source on GitHub ↗

Creates an HTTP client configured with appropriate headers and compression

()

Source from the content-addressed store, hash-verified

30
31/// Creates an HTTP client configured with appropriate headers and compression
32pub 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///

Callers 1

mainFunction · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected