Watch this account for changes
const options = {method: 'GET'};
fetch('https://ownsi.dev/api/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://ownsi.dev/api/events{
"type": "heartbeat"
}{
"error": {
"code": "<string>",
"message": "<string>",
"docsUrl": "<string>"
}
}Watch this account for changes
Server-sent events, one connection per open tab. Every message arrives on the default message event and its type field says what moved; it carries no state of its own, so the client reads the resource back over its own route. A heartbeat every twenty seconds keeps the connection off an idle proxy’s timer and tells a client that has heard nothing that it is still connected.
GET
/
api
/
events
Watch this account for changes
const options = {method: 'GET'};
fetch('https://ownsi.dev/api/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://ownsi.dev/api/events{
"type": "heartbeat"
}{
"error": {
"code": "<string>",
"message": "<string>",
"docsUrl": "<string>"
}
}Response
The stream, open until the client closes it.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Allowed value:
"heartbeat"