-
Notifications
You must be signed in to change notification settings - Fork 15
Don't add streams support? #25
Comments
I'm +1 for this if we have a goal to be cross-plat |
I would agree. |
I agree! |
We should probably revive (nodejs/undici#363). In the meantime undici-fetch can always use |
I have just recently tried to suggest/strive away from using either node or whatwg streams in node-fetch also, will see how far it goes if it can eventually operate on only AsyncIterator instead. (this would mean treating `blob.stream() as a iterator also) |
I think that'd be best. Have you got a link? |
Don't have a exact issue/link for it - more scattered around bit of places
All of it is more about supporting/accepting a AsyncIterator as an input then it is about returning something that should be a stream, eg we might still want response.body to still be the same underlying http response stream - don't see any reason to downgrade it to only be a AsyncIterator when it already is a async iterator in itself. |
with #43 the api is now going to accept any AsyncIterator as a body; meaning we can support either WHATWG or Node.js stream implementation. More work to be done on the body itself but this is a great step towards spec-compat |
One way to make things more spec compliant would be to not add support for Node streams and only AsyncIterables. That way developers that want to be cross platform compatible just have to avoid whatwg/Node streams and instead use AsyncIterable API's and it will work the same.
The text was updated successfully, but these errors were encountered: