Transition to ureq http client (#5777)

* Transition to ureq http client

* Remove unwrap
This commit is contained in:
Tyera Eulberg
2019-09-04 12:11:44 -07:00
committed by GitHub
parent 355640b5db
commit b19d9a50d3
16 changed files with 236 additions and 324 deletions

View File

@@ -523,9 +523,9 @@ pub fn query(q: &str) -> Result<String, String> {
&config.host, &config.username, &config.password, &q
);
let response = reqwest::get(query.as_str())
.map_err(|err| err.to_string())?
.text()
let response = ureq::get(query.as_str())
.call()
.into_string()
.map_err(|err| err.to_string())?;
Ok(response)