Fetches the canonical version of the listing from its GitHub URL. # Errors Any errors returned by the `reqwest` client.
(self)
| 92 | /// |
| 93 | /// Any errors returned by the `reqwest` client. |
| 94 | pub fn check(self) -> reqwest::Result<CheckedListing> { |
| 95 | let resp = HTTP.get(self.url.clone() + "?raw=true").send()?; |
| 96 | resp.error_for_status_ref()?; |
| 97 | Ok(CheckedListing { |
| 98 | title: self.title, |
| 99 | local: self.local, |
| 100 | remote: resp.text()?, |
| 101 | url: self.url, |
| 102 | }) |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /// A checked listing containing both the Markdown version and the canonical |