Skip to content

Commit e69208e

Browse files
krzysdzbjohansebas
andauthored
Reflect body-parser changes in 5.x API docs and include those that where missing (expressjs#1883)
* Reflect body-parser changes in 5.x API docs * Include missing body-parser middleware docs and alphabetize This is expressjs@8225868, but for 5.x API. --------- Co-authored-by: krzysdz <krzysdz@users.noreply.github.com> Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
1 parent f24f45a commit e69208e

6 files changed

Lines changed: 16 additions & 6 deletions

File tree

_includes/api/en/5x/express.json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Unicode encoding of the body and supports automatic inflation of `gzip` and
1010
`deflate` encodings.
1111

1212
A new `body` object containing the parsed data is populated on the `request`
13-
object after the middleware (i.e. `req.body`), or an empty object (`{}`) if
13+
object after the middleware (i.e. `req.body`), or `undefined` if
1414
there was no body to parse, the `Content-Type` was not matched, or an error
1515
occurred.
1616

_includes/api/en/5x/express.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,21 @@ const app = express()
1414
</section>
1515

1616
<section markdown="1">
17-
{% include api/en/5x/express.static.md %}
17+
{% include api/en/5x/express.raw.md %}
1818
</section>
1919

2020
<section markdown="1">
2121
{% include api/en/5x/express.router.md %}
2222
</section>
2323

24+
<section markdown="1">
25+
{% include api/en/5x/express.static.md %}
26+
</section>
27+
28+
<section markdown="1">
29+
{% include api/en/5x/express.text.md %}
30+
</section>
31+
2432
<section markdown="1">
2533
{% include api/en/5x/express.urlencoded.md %}
2634
</section>

_includes/api/en/5x/express.raw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ any Unicode encoding of the body and supports automatic inflation of `gzip` and
1010
`deflate` encodings.
1111

1212
A new `body` `Buffer` containing the parsed data is populated on the `request`
13-
object after the middleware (i.e. `req.body`), or an empty object (`{}`) if
13+
object after the middleware (i.e. `req.body`), or `undefined` if
1414
there was no body to parse, the `Content-Type` was not matched, or an error
1515
occurred.
1616

_includes/api/en/5x/express.text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ any Unicode encoding of the body and supports automatic inflation of `gzip` and
1010
`deflate` encodings.
1111

1212
A new `body` string containing the parsed data is populated on the `request`
13-
object after the middleware (i.e. `req.body`), or an empty object (`{}`) if
13+
object after the middleware (i.e. `req.body`), or `undefined` if
1414
there was no body to parse, the `Content-Type` was not matched, or an error
1515
occurred.
1616

_includes/api/en/5x/express.urlencoded.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ parser accepts only UTF-8 encoding of the body and supports automatic
99
inflation of `gzip` and `deflate` encodings.
1010

1111
A new `body` object containing the parsed data is populated on the `request`
12-
object after the middleware (i.e. `req.body`), or an empty object (`{}`) if
12+
object after the middleware (i.e. `req.body`), or `undefined` if
1313
there was no body to parse, the `Content-Type` was not matched, or an error
1414
occurred. This object will contain key-value pairs, where the value can be
1515
a string or array (when `extended` is `false`), or any type (when `extended`

_includes/api/en/5x/menu.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
<ul id="express-menu">
55
<li><em>Methods</em></li>
66
<li id="express-json-middleware"><a href="#express.json">express.json()</a></li>
7-
<li id="express-static-middleware"><a href="#express.static">express.static()</a></li>
7+
<li id="express-raw-middleware"><a href="#express.raw">express.raw()</a></li>
88
<li id="express-router"><a href="#express.router">express.Router()</a></li>
9+
<li id="express-static-middleware"><a href="#express.static">express.static()</a></li>
10+
<li id="express-text-middleware"><a href="#express.text">express.text()</a></li>
911
<li id="express-urlencoded-middleware"><a href="#express.urlencoded">express.urlencoded()</a></li>
1012
</ul>
1113
</li>

0 commit comments

Comments
 (0)