Upgrade reqwest to 0.9
And fix changement linked to how headers work now Required to compile with recent OpenSsl
This commit is contained in:
parent
b919428fe1
commit
d92086f082
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ keywords = ["webfinger"]
|
|||
categories = ["web-programming"]
|
||||
license = "GPL-3.0"
|
||||
[dependencies]
|
||||
reqwest = "0.8"
|
||||
reqwest = "0.9"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
|
|
@ -8,7 +8,7 @@ extern crate serde;
|
|||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
|
||||
use reqwest::{Client, header::{Accept, qitem}, mime::Mime};
|
||||
use reqwest::{header::ACCEPT, Client};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
@ -86,7 +86,7 @@ pub fn resolve<T: Into<String>>(acct: T, with_https: bool) -> Result<Webfinger,
|
|||
let url = url_for_acct(acct, with_https)?;
|
||||
Client::new()
|
||||
.get(&url[..])
|
||||
.header(Accept(vec![qitem("application/jrd+json".parse::<Mime>().unwrap())]))
|
||||
.header(ACCEPT, "application/jrd+json")
|
||||
.send()
|
||||
.map_err(|_| WebfingerError::HttpError)
|
||||
.and_then(|mut r| r.text().map_err(|_| WebfingerError::HttpError))
|
||||
|
|
Loading…
Reference in a new issue