(&self, url: &str)
| 77 | impl 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 | } |