ServerSentEventStream: decoding support
Is your feature request related to a problem? Please describe.
EventSource works well for GET with no custom request headers but does not super other HTTP verbs, request bodies, or custom request headers (e.g. Authorization).
Describe the solution you'd like
I want to be able to use the standard Fetch API and pipe its response body stream into a SSE message decoder so that I'm not limited by EventSource.
The encode/decode functions for server sent event message could also be exported and helpful. (Under @std/encoding?)
Describe alternatives you've considered
Use a package like https://github.com/lukeed/fetch-event-stream or roll it myself. Both of these seem less than ideal though given that @std supports encoding and I'd like to get decoding support from the same instead of relying on two sources.
Do you know about ServerSentEventStream? Disclaimer: I only skimmed this issue.
Do you know about
ServerSentEventStream? Disclaimer: I only skimmed this issue.
Yes. This works for encoding but does not support decoding.
Maybe something like ServerSentEventParseStream in @std/http?
Yes. These two stream classes could also be named like other encoding/decoding ones: EventEncoderStream and EventDecoderStream.