-
Notifications
You must be signed in to change notification settings - Fork 663
Description
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.