You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `app.router` object, which was removed in Express 4, has made a comeback in Express 5. In the new version, this object is a just a reference to the base Express router, unlike in Express 3, where an app had to explicitly load it.
508
509
509
-
<h3id="req.body">req.body</h3>
510
+
<h3id="req.body">req.body</h3>
510
511
511
512
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
512
513
513
514
<h3id="req.host">req.host</h3>
514
515
515
516
In Express 4, the `req.host` function incorrectly stripped off the port number if it was present. In Express 5, the port number is maintained.
516
517
518
+
<h3id="req.params">req.params</h3>
519
+
520
+
Parameters specified as wildcards are represented as arrays of segments:
Optional parameters that are not matched do not have a key in `req.params`. In 4.x an unmatched wildcard would be an empty string and a `:` parameter made optional by `?` had a key with value `undefined`.
531
+
532
+
The object has null prototype.
533
+
517
534
<h3id="req.query">req.query</h3>
518
535
519
536
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".
0 commit comments