web-push: Send messages using Web Push protocol.

[ library, mit, web ] [ Propose Tags ]

Please see README.md

[Skip to Readme]
Versions [faq],
Dependencies aeson, base (>=4.7 && <5), base64-bytestring (>= && <1.1), binary (>=0.7.5 && <0.9), bytestring (>=0.9 && <0.11), cryptonite (==0.21.*), exceptions (>=0.8.3 && <0.9), http-client (>=0.5.7 && <0.6), http-types (>=0.8.6 && <1.0), jose (>= && <0.6), memory (>=0.14.5 && <0.15), mtl (>=2.2.1 && <2.3), random (==1.1.*), text (>=0.11 && <2.0), time, transformers (>= && <0.6), unordered-containers [details]
License MIT
Copyright 2017 Sarthak Bagaria
Author Sarthak Bagaria
Maintainer neokits@gmail.com
Category Web
Home page https://github.com/sarthakbagaria/web-push#readme
Source repo head: git clone https://github.com/sarthakbagaria/web-push
Uploaded by sarthakbagaria at Sat Jun 17 19:18:11 UTC 2017
Distributions NixOS:
Downloads 1081 total (89 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-06-17 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for web-push-

[back to package description]


Helper functions to send messages using Web Push protocol.


The sendPushNotification function encodes the message into Base64 URL form before encrypting and sending. Decode the message in Service Worker notification handler in browser before trying to read the JSON message.

Guides to using Web Push API in browsers can be found on Mozilla's and Google's docs, or you can check out this untested Yesod app demonstrating the use of this library.

To Do

  • Add recognition of more error/status codes from send notification HTTP response.
  • Clearly differentiate between ByteString encodings (Raw, Base64URL etc).
  • Extend tests to verify that push messages are sent properly.


Current implementation is based on the following versions of the drafts: