web-push-libs / pywebpush

Python Webpush Data encryption library
Mozilla Public License 2.0
303 stars 52 forks source link

Add headers parameter to webpush #120

Open fuglede opened 4 years ago

fuglede commented 4 years ago

An example of where this could be useful is the Urgency parameter (5.3 of the RFC). To use that (as I understand the API of the package), you would have to use WebPusher, duplicate the part of webpush concerned with defining vapid_headers, and then set 'Urgency' yourself. (In fact, since TTL already exists as a separate parameter, perhaps Urgency could as well?)