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.
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.