@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
@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