You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventSource is a good and simple API to easily implement streaming. At the moment, it's easy to generate an event source stream from a Cloudflare Worker, but it's not easy to consume one from a Clouflare Worker.
Most polyfills are incompatible with Cloudflare Workers:
eventsource relies on http/https module and doesn't work well with the browserify polyfills
While it's definitely possible to make a polyfill of EventSource works on Worker, it'd be great if this API could be natively supported, especially as the API surface is light and not browser-specific.
It looks like @cloudflare/ai also consumes an EventSource API, but it's unclear what polyfill is being used there and if the Cloudflare team could publish it as an open source package.
The text was updated successfully, but these errors were encountered:
EventSource
is a good and simple API to easily implement streaming. At the moment, it's easy to generate an event source stream from a Cloudflare Worker, but it's not easy to consume one from a Clouflare Worker.Most polyfills are incompatible with Cloudflare Workers:
event-source-polyfill
usesfetch
options that are not supported by Cloudflare, I'll publish a forkeventsource
relies onhttp
/https
module and doesn't work well with the browserify polyfillsWhile it's definitely possible to make a polyfill of
EventSource
works on Worker, it'd be great if this API could be natively supported, especially as the API surface is light and not browser-specific.It looks like
@cloudflare/ai
also consumes an EventSource API, but it's unclear what polyfill is being used there and if the Cloudflare team could publish it as an open source package.The text was updated successfully, but these errors were encountered: