This is one of many protocol behaviors described in ActivityPub.

Identifier

urn:uuid:58e7c787-1b39-427f-912a-42c607fa4de8

Content

The client MUST specify an Accept header with the application/ld+json; profile="https://www.w3.org/ns/activitystreams" media type in order to retrieve the activity.

Origin

prefix and SHOULD also present the ActivityStreams representation in response to application/activity+json as well.

The client MUST specify an Accept header with the application/ld+json; profile="https://www.w3.org/ns/activitystreams" media type in order to retrieve the activity.
 
suffix Servers MAY implement other behavior for requests which do not comply with the above requirement.

https://www.w3.org/TR/activitypub/

JSON

{
  "id": "urn:uuid:58e7c787-1b39-427f-912a-42c607fa4de8",
  "type": "Behavior",
  "uuid": "58e7c787-1b39-427f-912a-42c607fa4de8",
  "name": "client must include correct Accept header when retrieving objects",
  "content": "The client MUST specify an Accept header with the application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\" media type in order to retrieve the activity.\n",
  "origin": {
    "source": "https://www.w3.org/TR/activitypub/",
    "section": {
      "id": "https://www.w3.org/TR/activitypub/#retrieving-objects",
      "branch": [
        3,
        2
      ]
    },
    "selector": {
      "type": "TextQuoteSelector",
      "exact": "The client MUST specify an Accept header with the application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\" media type in order to retrieve the activity.\n",
      "prefix": "and SHOULD also present the ActivityStreams representation in response to application/activity+json as well.\n",
      "suffix": "Servers MAY implement other behavior for requests which do not comply with the above requirement.\n"
    }
  },
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://socialweb.coop/ns/testing/context.json"
  ]
}