mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-10 09:19:34 +00:00
static
This commit is contained in:
parent
2f9f798303
commit
fd990f410d
|
@ -53,8 +53,8 @@ pub async fn fetch_object_http<T: Clone, Kind: DeserializeOwned>(
|
||||||
url: &Url,
|
url: &Url,
|
||||||
data: &Data<T>,
|
data: &Data<T>,
|
||||||
) -> Result<FetchObjectResponse<Kind>, Error> {
|
) -> Result<FetchObjectResponse<Kind>, Error> {
|
||||||
const CONTENT_TYPE: HeaderValue = HeaderValue::from_static(FEDERATION_CONTENT_TYPE);
|
static CONTENT_TYPE: HeaderValue = HeaderValue::from_static(FEDERATION_CONTENT_TYPE);
|
||||||
const ALT_CONTENT_TYPE: HeaderValue = HeaderValue::from_static(
|
static ALT_CONTENT_TYPE: HeaderValue = HeaderValue::from_static(
|
||||||
r#"application/ld+json; profile="https://www.w3.org/ns/activitystreams"#,
|
r#"application/ld+json; profile="https://www.w3.org/ns/activitystreams"#,
|
||||||
);
|
);
|
||||||
let res = fetch_object_http_with_accept(url, data, &CONTENT_TYPE).await?;
|
let res = fetch_object_http_with_accept(url, data, &CONTENT_TYPE).await?;
|
||||||
|
|
|
@ -35,7 +35,7 @@ impl WebFingerError {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The content-type for webfinger responses.
|
/// 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`.
|
/// Takes an identifier of the form `name@example.com`, and returns an object of `Kind`.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue