t2trg / t2trg-rest-iot

RESTful Design for Internet of Things Systems
3 stars 4 forks source link

Major: Server-sent events (SSE) #70

Open mkovatsc opened 2 years ago

mkovatsc commented 2 years ago

Server-sent events (SSE) are seriously bizarre; I think this could be mentioned here.

We need some consensus on the "bizarreness" or at least to understand the expected guidance.

SSE work a bit like HTTP headers with an identifier event: followed by a user-defined string and newline (\n) and then the identifier 'data:' followed by a user-defined string without newline (can be a JSON structure) and terminated with an empty line (\n\n) -- bizarrely not using \r\n like HTTP headers...

I don't think we need to explain this in this document.