Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requestPOSTToServer is not defined #658

Closed
Alzabel999999 opened this issue May 29, 2022 · 2 comments
Closed

requestPOSTToServer is not defined #658

Alzabel999999 opened this issue May 29, 2022 · 2 comments
Assignees
Labels

Comments

@Alzabel999999
Copy link

In your js cannot find function requestPOSTToServer. Where I can get it?

@blighj
Copy link
Contributor

blighj commented Nov 21, 2022

@Alzabel999999
Any feedback on this PR, #674, specfically this file, which aims to explain wepush configuration
https://github.com/jazzband/django-push-notifications/blob/4fb64be08a5e9d4b9275e9632426d022d5a84a70/docs/WebPush.rst

@azmeuk
Copy link
Member

azmeuk commented Aug 18, 2023

Until #674 is merged, you can find an implementation in the README:

function requestPOSTToServer ( data ) {
$.ajax({
url: '/PATH/DEFINED/IN/URLS.PY/',
data: {
'browser': data.browser,
'p256dh': data.p256dh,
'auth': data.auth,
'registration_id': data.registration_id
},
dataType: 'json',
success: function (data) {
}
});
}

@azmeuk azmeuk closed this as completed Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants