Skip to content

Commit e363326

Browse files
docs: update external docs
1 parent bf06950 commit e363326

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

src/content/pages/en/resources/middleware/body-parser.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ This module provides the following parsers:
4444
- [Text body parser](#bodyparsertextoptions)
4545
- [URL-encoded form body parser](#bodyparserurlencodedoptions)
4646

47+
All parsers support automatic inflation of `gzip`, `br` (brotli), `deflate`
48+
and `zstd` encodings. `zstd` is available in Node.js `^22.15.0` and
49+
`>=23.8.0`.
50+
4751
Other body parsers you might be interested in:
4852

4953
- [body](https://www.npmjs.com/package/body#readme)
@@ -85,8 +89,7 @@ The various errors returned by this module are described in the
8589

8690
Returns middleware that only parses `json` and only looks at requests where
8791
the `Content-Type` header matches the `type` option. This parser accepts any
88-
Unicode encoding of the body and supports automatic inflation of `gzip`,
89-
`br` (brotli) and `deflate` encodings.
92+
Unicode encoding of the body.
9093

9194
A new `body` object containing the parsed data is populated on the `request`
9295
object after the middleware (i.e. `req.body`).
@@ -146,9 +149,7 @@ encoding of the request. The parsing can be aborted by throwing an error.
146149
### bodyParser.raw([options])
147150

148151
Returns middleware that parses all bodies as a `Buffer` and only looks at
149-
requests where the `Content-Type` header matches the `type` option. This
150-
parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate`
151-
encodings.
152+
requests where the `Content-Type` header matches the `type` option.
152153

153154
A new `body` object containing the parsed data is populated on the `request`
154155
object after the middleware (i.e. `req.body`). This will be a `Buffer` object
@@ -194,9 +195,7 @@ encoding of the request. The parsing can be aborted by throwing an error.
194195
### bodyParser.text([options])
195196

196197
Returns middleware that parses all bodies as a string and only looks at
197-
requests where the `Content-Type` header matches the `type` option. This
198-
parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate`
199-
encodings.
198+
requests where the `Content-Type` header matches the `type` option.
200199

201200
A new `body` string containing the parsed data is populated on the `request`
202201
object after the middleware (i.e. `req.body`). This will be a string of the
@@ -247,8 +246,7 @@ encoding of the request. The parsing can be aborted by throwing an error.
247246

248247
Returns middleware that only parses `urlencoded` bodies and only looks at
249248
requests where the `Content-Type` header matches the `type` option. This
250-
parser accepts only UTF-8 and ISO-8859-1 encodings of the body and supports
251-
automatic inflation of `gzip`, `br` (brotli) and `deflate` encodings.
249+
parser accepts only UTF-8 and ISO-8859-1 encodings of the body.
252250

253251
A new `body` object containing the parsed data is populated on the `request`
254252
object after the middleware (i.e. `req.body`). This object will contain
@@ -358,7 +356,7 @@ the entity value that failed parsing.
358356
### entity verify failed
359357

360358
This error will occur when the request contained an entity that could not be
361-
failed verification by the defined `verify` option. The `status` property is
359+
verified by the defined `verify` option. The `status` property is
362360
set to `403`, the `type` property is set to `'entity.verify.failed'`, and the
363361
`body` property is set to the entity value that failed verification.
364362

0 commit comments

Comments
 (0)