The web-push package

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

Please see README.md


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.2.0
Dependencies aeson, base (>=4.7 && <5), base64-bytestring (>=1.0.0.1 && <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.5.0.4 && <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.5.2.0 && <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 repository head: git clone https://github.com/sarthakbagaria/web-push
Uploaded Sat Jun 17 19:18:11 UTC 2017 by sarthakbagaria
Distributions NixOS:0.1.2.0
Downloads 110 total (6 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-06-17 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for web-push-0.1.2.0

[back to package description]

web-push

Helper functions to send messages using Web Push protocol.

Usage

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.

References

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