MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / retrieve_from_url

Method retrieve_from_url

css-inline/src/resolver.rs:79–88  ·  view source on GitHub ↗
(&self, url: &str)

Source from the content-addressed store, hash-verified

77impl StylesheetResolver for DefaultStylesheetResolver {
78 #[cfg(feature = "http")]
79 fn retrieve_from_url(&self, url: &str) -> Result<String> {
80 let into_error = |error| InlineError::Network {
81 error,
82 location: url.to_string(),
83 };
84 reqwest::blocking::get(url)
85 .map_err(into_error)?
86 .text()
87 .map_err(into_error)
88 }
89}

Callers 1

retrieveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected