From b72afb1695f51211e1fd0f9741bea9cc26570a13 Mon Sep 17 00:00:00 2001
From: Philipp Heckel
- const eventSource = new EventSource(`https://ntfy.sh/mytopic/sse`);
+ const eventSource = new EventSource('https://ntfy.sh/mytopic/sse');
eventSource.onmessage = (e) => {
// Do something with e.data
};
@@ -100,9 +100,9 @@
Here's an example in JS with fetch() (see full example):
- fetch(`https://ntfy.sh/mytopic`, {
+ fetch('https://ntfy.sh/mytopic', {
method: 'POST', // PUT works too
- body: `Hello from the other side.`
+ body: 'Hello from the other side.'
})