Created
November 16, 2020 06:48
-
-
Save ThisIsBenny/34a278d8c50966f870cc21fba155d2d2 to your computer and use it in GitHub Desktop.
PushCut Notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const req = new Request('https://api.pushcut.io/l...-s/notifications/Example') | |
await req.loadJSON() | |
// Oder mit dynamischen Title und Text. Und einer Url welche sich öffnet wenn man die Push Nachricht anklickt. | |
const req2 = new Request('https://api.pushcut.io/l...-s/notifications/Example') | |
req2.method = 'POST' | |
req2.headers = { | |
'Content-Type': 'application/json' | |
} | |
req2.body = JSON.stringify({ | |
title: 'Apple Store Bestellung', | |
text: 'Der Status deiner Bestellung XYZ hat sich auf "foo" geändert.', | |
input: 'https://apple.com/....' | |
}) | |
await req2.loadJSON() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment