@grishka you have to use `application/activity+json` for the accept header. tbh i'm quite confused about all the different ones, and dont know which ones we should support or not.
Top-level
2 comments
@grishka actually I think we support the exact headers defined in the activitypub spec. But not the one you mention, and I dont know if our web framework supports parsing the accept header. Anyway, here are our docs for federation: https://join.lemmy.ml/docs/en/federation/overview.html https://join.lemmy.ml/docs/en/federation/lemmy_protocol.html |
@felix Mastodon sends this:
Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html;q=0.1
This also returns HTML. application/activity+json by itself works. Many web frameworks parse the Accept header and allow specifying different handlers for different content types. I only had to specify it twice to cover all possible cases:
https://github.com/grishka/Smithereen/blob/master/src/main/java/smithereen/Main.java#L192