@@ -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+
4751Other 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
8690Returns middleware that only parses ` json ` and only looks at requests where
8791the ` 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
9194A new ` body ` object containing the parsed data is populated on the ` request `
9295object 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
148151Returns 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
153154A new ` body ` object containing the parsed data is populated on the ` request `
154155object 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
196197Returns 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
201200A new ` body ` string containing the parsed data is populated on the ` request `
202201object 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
248247Returns middleware that only parses ` urlencoded ` bodies and only looks at
249248requests 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
253251A new ` body ` object containing the parsed data is populated on the ` request `
254252object 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
360358This 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
362360set 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