Skip to content

Yasuke/web-push

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Web Push library in Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%