Module notedealer::http_api::activity_json
source · [−]Expand description
Types and helpers for using the Activity Streams 2.0 media type when sending and receiving ActivityPub objects over HTTP.
Constants
The long media type string for Activity Streams objects, recommended by the
ActivityPub specification.
The short media type string for Activity Streams objects.
Statics
The strongly typed version of
CT_ACTIVITY_JSON, for Content-Type headers.Functions
A guard to filter out requests that do not have either
CT_ACTIVITY_JSON or
CT_ACTIVITY_JSON_SHORT in their Accept header.A guard to filter out requests that have neither
CT_ACTIVITY_JSON nor
CT_ACTIVITY_JSON_SHORT in their Content-Type header.Short utility function for serializing the given Activity Streams object and
returning it inside a
HttpResponse with the appropriate Content-Type
header.