-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add example for request
+ "Garbage Collection"
#3916
Conversation
It was added under the fetch specification compliance section. It should be moved elsewhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the unnecessary promises?
@KhafraDev do you think I should move the whole GC section or just the new example for request? Also, is there a reason to |
yes exactly. Currently this allocates one promise too much ;).
If you don't await dump, you'll still have asynchronous activity happening in the background, as the body will not be dumped immediately. Not awaiting it defeats the purpose of the example, as without it there will be lingering memory and activity running. |
I've updated both examples to use async await, let me know what you think.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
- This feature was implemented in undici 7.1.1, according to nodejs/undici#3916 (comment)
This relates to...
See #3914
Changes
Added an example for
request
+ "Garbage Collection".Status