Why does undici use ReadableStream
from stream/web
if it is a Node library?
#3409
-
In Node, there exist different interfaces for
In undici, we use the web interface here: https://github.com/nodejs/undici/blob/main/types/fetch.d.ts#L7. |
Beta Was this translation helpful? Give feedback.
Answered by
Ethan-Arrowood
Jul 18, 2024
Replies: 1 comment 1 reply
-
Fetch is a browser API and Undici implements it as close to specification as possible (meaning it uses Web Other methods in Undici use the Node.js Stream Node.js has support for many Web Apis (specified by WHATWG or W3C) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mcollina
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fetch is a browser API and Undici implements it as close to specification as possible (meaning it uses Web
ReadableStream
).Other methods in Undici use the Node.js Stream
Readable
.Node.js has support for many Web Apis (specified by WHATWG or W3C)