-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plans to add async iterator support to IncomingMessage? #277
Comments
Hi @hbgl, there are no plans to implement this feature. So I'd like encourage you to create a PR wow add a missing functionality. |
Hello @eugef, thanks for the reply. I will create a PR for this new feature once I am done. It will require Node version >= 10 because that is when async iterator support was added. As an aside, I would not give up on properly extending from |
We are currently supporting Node.js 14 and above, so you can safely use async iterators |
I saw this line in the package.json Lines 40 to 42 in 5d97424
So I was unsure if adding async iterators would be a problem. Thanks for clearing that up. |
Thanks for pointing out, I will fix it straight away |
Node's
http.IncomingMessage
inherits fromstream.Readable
which implements the async iterator protocol in recent versions of Node. It would be appropriate for the mock to also have support for it. A use case would be converting anhttp.IncomingMessage
to a webRequest
:It would help me fix this issue in Astro: withastro/astro#7525 (comment)
The text was updated successfully, but these errors were encountered: