Accept both jrd+json and json for queries #4

Merged
kiwii merged 1 commits from plume/webfinger:accept-json into master 6 years ago

@ -89,7 +89,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, "application/jrd+json")
.header(ACCEPT, "application/jrd+json, application/json")
.send()
.map_err(|_| WebfingerError::HttpError)
.and_then(|mut r| r.text().map_err(|_| WebfingerError::HttpError))

Loading…
Cancel
Save