Plug router for the Pusher REST API:
POST /apps/{app_id}/events: trigger an eventPOST /apps/{app_id}/batch_events: trigger up to 10 events at onceGET /apps/{app_id}/channels: list occupied channels (filter_by_prefix, andinfo=user_countfor presence channels)GET /apps/{app_id}/channels/{channel}: one channel's infoGET /: health check;GET /metrics: Prometheus metrics (opt-in)
Signature verification happens on the raw body/query, before any JSON parsing, since the signature covers the exact bytes sent.
The instance name comes in via the plug opts configured in the
cowboy dispatch table ({Plug.Cowboy.Handler, {PusherServer.HttpRouter, name: name}}) and is stashed in conn.private by overriding call/2 —
the standard Plug technique for parameterizing a Plug.Router.
Summary
Functions
Callback implementation for Plug.init/1.
Functions
Callback implementation for Plug.init/1.