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
This is just a fun thought that I don't personally plan to spend much time on.
It should be in theory possible to run undici in the browser (especially the fetch parts) if one creates a BrowserClient implementation based on e.g. XMLHTTPRequest. That way we could in theory even act as an alternative to e.g. https://github.com/github/fetch fetch polyfill.
We have implemented some of the web stuff from the spec and there a clear TODOs (examples) with references to spec for the missing parts. There are a few node specific stuff we make use of (e.g. Buffer) but those should be somewhat trivial to either replace or polyfill.
The text was updated successfully, but these errors were encountered:
Sounds fun but also pointless, XMLHttpRequest don't have any good streaming support
also you would be importing a browserified version of node:http that includes buffer, readable-stream and many other small sub packages like inherit. that alone is some few 170kb of code the amount code would be large
pretty much all browser ships fetch now days. so what would be the point?
This is just a fun thought that I don't personally plan to spend much time on.
It should be in theory possible to run undici in the browser (especially the fetch parts) if one creates a
BrowserClient
implementation based on e.g. XMLHTTPRequest. That way we could in theory even act as an alternative to e.g. https://github.com/github/fetch fetch polyfill.We have implemented some of the web stuff from the spec and there a clear TODOs (examples) with references to spec for the missing parts. There are a few node specific stuff we make use of (e.g. Buffer) but those should be somewhat trivial to either replace or polyfill.
The text was updated successfully, but these errors were encountered: