This commit is contained in:
Felix Ableitner 2024-02-29 20:23:21 +01:00
parent 2f9f798303
commit fd990f410d
2 changed files with 3 additions and 3 deletions

View file

@ -53,8 +53,8 @@ pub async fn fetch_object_http<T: Clone, Kind: DeserializeOwned>(
url: &Url,
data: &Data<T>,
) -> Result<FetchObjectResponse<Kind>, Error> {
const CONTENT_TYPE: HeaderValue = HeaderValue::from_static(FEDERATION_CONTENT_TYPE);
const ALT_CONTENT_TYPE: HeaderValue = HeaderValue::from_static(
static CONTENT_TYPE: HeaderValue = HeaderValue::from_static(FEDERATION_CONTENT_TYPE);
static ALT_CONTENT_TYPE: HeaderValue = HeaderValue::from_static(
r#"application/ld+json; profile="https://www.w3.org/ns/activitystreams"#,
);
let res = fetch_object_http_with_accept(url, data, &CONTENT_TYPE).await?;

View file

@ -35,7 +35,7 @@ impl WebFingerError {
}
/// The content-type for webfinger responses.
pub const WEBFINGER_CONTENT_TYPE: HeaderValue = HeaderValue::from_static("application/jrd+json");
pub static WEBFINGER_CONTENT_TYPE: HeaderValue = HeaderValue::from_static("application/jrd+json");
/// Takes an identifier of the form `name@example.com`, and returns an object of `Kind`.
///