Open
Description
Hello,
It would be nice to be able to just get the encoded push request so we could use another http library for sending the request. Our motivation is to do this in an async framework, but there could be others.
Now we do this by monkeypatching the library:
import pywebpush
pywebpush.WebPusher.as_curl = lambda self, endpoint, data, headers: {'endpoint': endpoint, 'data': data, 'headers': headers}
then we can just pass curl=True
to any function and get the data we want. But it would be nicer to do this in an official way.
Metadata
Metadata
Assignees
Labels
No labels