Update reqwest to 0.10.0

This commit is contained in:
Alexander Krotov
2020-01-09 11:09:29 +03:00
parent 02bb41697d
commit 43e0109d44
4 changed files with 240 additions and 307 deletions

View File

@@ -11,10 +11,10 @@ pub type Result<T> = std::result::Result<T, Error>;
pub fn read_url(context: &Context, url: &str) -> Result<String> {
info!(context, "Requesting URL {}", url);
match reqwest::Client::new()
match reqwest::blocking::Client::new()
.get(url)
.send()
.and_then(|mut res| res.text())
.and_then(|res| res.text())
{
Ok(res) => Ok(res),
Err(err) => {