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
Similar legacy web-apis (atob and btoa) have been added to the node core, it could be useful for developing cross-platform code.
Also, XMLHttpRequest supports progress events which could be useful since this has been an ongoing discussion in fetch for well over half a decade now (whatwg/fetch#607 & whatwg/fetch#65).
The spec itself hardly receives updates so once a stable version is completed, it shouldn't cause any extra maintenance burden. I'd be willing to fix bugs in the implementation, similar to what I do with fetch 😛.
By exporting a few things from fetch, this could entirely be done by a third-party module piggy-backing on undici's fetch. Since the logic of xhr is intertwined with fetch, it can't be done as easily with node's http/s modules.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This would solve...
Similar legacy web-apis (
atob
andbtoa
) have been added to the node core, it could be useful for developing cross-platform code.Also,
XMLHttpRequest
supports progress events which could be useful since this has been an ongoing discussion in fetch for well over half a decade now (whatwg/fetch#607 & whatwg/fetch#65).The spec itself hardly receives updates so once a stable version is completed, it shouldn't cause any extra maintenance burden. I'd be willing to fix bugs in the implementation, similar to what I do with fetch 😛.
On npm, packages emulating xmlhttprequest have millions of downloads weekly, so there does seem to be some demand for it.
https://www.npmjs.com/package/xmlhttprequest
https://www.npmjs.com/package/xmlhttprequest-ssl
https://www.npmjs.com/package/xhr2
The implementation should look like...
https://github.com/KhafraDev/undici/tree/xmlhttprequest (not done, a prototype for now)
I have also considered...
By exporting a few things from
fetch
, this could entirely be done by a third-party module piggy-backing on undici's fetch. Since the logic of xhr is intertwined with fetch, it can't be done as easily with node's http/s modules.Additional context
Mostly just want to ask for your opinions 😄.
Beta Was this translation helpful? Give feedback.
All reactions