3 ms·
> we have to re-implement response payloads (one for application/json and one for text/event-stream) I am curious about what you mean here. The 'text/event-str
by gorjusborg 2y ago
> we have to re-implement response payloads (one for application/json and one for text/event-stream)
I am curious about what you mean here. The 'text/event-stream' allows for abitrary event formats, it just provides structure for EventSource to be able to parse.
You should only need one 'text/event-stream' and should be able send the same JSON via normal or SSE response.
- josephg 2y agoWhat the GP commenter might have meant is that websockets support binary message bodies. SSE does not.