The web-push package

[ Tags: library, mit, web ] [ Propose Tags ]

Please see

[Skip to Readme]


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
Category Web
Home page
Source repo head: git clone
Uploaded Sat Jun 17 19:18:11 UTC 2017 by sarthakbagaria
Distributions NixOS:
Downloads 362 total (14 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-06-17 [all 1 reports]
Hackage Matrix CI




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: