Skip to content

Instantly share code, notes, and snippets.

@ThisIsBenny
Created November 16, 2020 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThisIsBenny/34a278d8c50966f870cc21fba155d2d2 to your computer and use it in GitHub Desktop.
Save ThisIsBenny/34a278d8c50966f870cc21fba155d2d2 to your computer and use it in GitHub Desktop.
PushCut Notification
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