undici
undici copied to clipboard
chore(docs): add request() example for conditionally reading the body
This relates to...
Documentation for dispatcher.request()
Rationale
It is very easy to cause a memory leak or even crash the process if you forget to handle the response body.
Changes
A new example showing how to conditionally reading the body
Features
N/A
Bug Fixes
N/A
Breaking Changes and Deprecations
N/A
Status
- [x] I have read and agreed to the Developer's Certificate of Origin
- [ ] Tested
- [ ] Benchmarked (optional)
- [x] Documented
- [ ] Review ready
- [ ] In review
- [ ] Merge ready
@Ethan-Arrowood PTAL
What about @styfle 's comment / question here: https://github.com/nodejs/undici/pull/3743#discussion_r1804918142
Is dump sufficient if the body is larger than its limit?