undici icon indicating copy to clipboard operation
undici copied to clipboard

chore(docs): add request() example for conditionally reading the body

Open styfle opened this issue 4 months ago • 2 comments

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

styfle avatar Oct 16 '24 21:10 styfle