web_push_encryption v0.2.0 WebPushEncryption.Push View Source
Module to send web push notifications with a payload through GCM
Link to this section Summary
Functions
Sends a web push notification with a payload through GCM
Link to this section Functions
Sends a web push notification with a payload through GCM.
Arguments
message
is a binary payload. It can be JSON encodedsubscription
is the subscription information received from the client. It should have the following form:%{keys: %{auth: AUTH, p256dh: P256DH}, endpoint: ENDPOINT}
auth_token
[Optional] is the GCM api key matching thegcm_sender_id
from the clientmanifest.json
. It is not necessary for Mozilla endpoints.
Return value
Returns the result of HTTPoison.post