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

@ -13,9 +13,9 @@ env_logger = "0.6.2"
influx_db_client = "0.3.6"
lazy_static = "1.4.0"
log = "0.4.8"
reqwest = "0.9.20"
solana-sdk = { path = "../sdk", version = "0.19.0-pre0" }
sys-info = "0.5.7"
ureq = "0.11.0"
[dev-dependencies]
rand = "0.6.5"

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)