diff --git a/src/fetch/mod.rs b/src/fetch/mod.rs index aed3f21..3436949 100644 --- a/src/fetch/mod.rs +++ b/src/fetch/mod.rs @@ -53,8 +53,8 @@ pub async fn fetch_object_http( url: &Url, data: &Data, ) -> Result, 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?; diff --git a/src/fetch/webfinger.rs b/src/fetch/webfinger.rs index dbf0069..7da2fdf 100644 --- a/src/fetch/webfinger.rs +++ b/src/fetch/webfinger.rs @@ -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`. ///