Email or username:

Password:

Forgot your password?
Top-level
Gregory

@felix first thing I tried was to get an actor for a community but this request returned an HTML page. Posts (/post/222) and users (/u/galo) do the same. Am I doing it wrong?

3 comments
felix

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

Gregory

@felix Mastodon sends this:

Accept: application/activity+json, application/ld+json; profile="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:
github.com/grishka/Smithereen/

felix

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

join.lemmy.ml/docs/en/federati

join.lemmy.ml/docs/en/federati

Go Up