1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-24 04:09:13 +01:00
ntfy/examples/publish-js/publish.html
2022-07-08 08:16:03 -04:00

18 lines
378 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Publish to ntfy.sh</title>
</head>
<body>
<button onclick="publish()">Publish</button>
</body>
<script>
function publish() {
fetch('https://ntfy.sh/mytopic', {
method: 'POST', // PUT works too
body: 'Backup successful 😀'
});
}
</script>
</html>