From ef54867369a53551cccb6751f6d889f633b4692b Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 19 Mar 2024 07:38:33 +0100 Subject: [PATCH] fix: add json header otherwise we get html --- src/activitystream/node.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/activitystream/node.rs b/src/activitystream/node.rs index 6fe783a0..185ca8ae 100644 --- a/src/activitystream/node.rs +++ b/src/activitystream/node.rs @@ -111,7 +111,10 @@ impl From for Node { impl Node{ pub async fn fetch(&mut self) -> reqwest::Result<()> { if let Node::Link(link) = self { - *self = reqwest::get(link.href()) + *self = reqwest::Client::new() + .get(link.href()) + .header("Accept", "application/json") + .send() .await? .json::() .await?