Accept more content types when making AP requests

This commit is contained in:
Bat
2018-07-18 16:25:02 +02:00
parent e3a7eadb78
commit 3d436c10b1
4 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ use std::{
time::SystemTime
};
use activity_pub::AP_ACCEPT_HEADER;
use activity_pub::sign::Signer;
const USER_AGENT: &'static str = "Plume/0.1.0";
@@ -25,7 +26,7 @@ pub fn headers() -> Headers {
let mut headers = Headers::new();
headers.set(UserAgent::new(USER_AGENT));
headers.set(Date(SystemTime::now().into()));
headers.set(ContentType(Mime::from_str("application/activity+json").unwrap()));
headers.set(ContentType(Mime::from_str(AP_ACCEPT_HEADER).unwrap()));
headers
}