Skip to content

Commit

Permalink
docs: document the behavior of consuming body twice (nodejs#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
is2ei authored and crysmags committed Feb 27, 2024
1 parent ad0a35d commit c6ece49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/Dispatcher.md
Expand Up @@ -489,6 +489,8 @@ The `RequestOptions.method` property should not be value `'CONNECT'`.
- `body`
- `bodyUsed`

`body` can not be consumed twice. For example, calling `text()` after `json()` throws `TypeError`.

`body` contains the following additional extensions:

- `dump({ limit: Integer })`, dump the response by reading up to `limit` bytes without killing the socket (optional) - Default: 262144.
Expand Down

0 comments on commit c6ece49

Please sign in to comment.