Skip to content

Commit b07d14a

Browse files
Update links to 5x api docs on use middleware page (#2039)
Co-authored-by: bjohansebas <[email protected]>
1 parent 8c1e4b3 commit b07d14a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

en/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: "/guide/using-middleware.html"
1010

1111
Express is a routing and middleware web framework that has minimal functionality of its own: An Express application is essentially a series of middleware function calls.
1212

13-
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/4x/api.html#req) (`req`), the [response object](/{{ page.lang }}/4x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. The next middleware function is commonly denoted by a variable named `next`.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. The next middleware function is commonly denoted by a variable named `next`.
1414

1515
Middleware functions can perform the following tasks:
1616

@@ -34,7 +34,7 @@ You can also load a series of middleware functions together, which creates a sub
3434

3535
<h2 id='middleware.application'>Application-level middleware</h2>
3636

37-
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/4x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
This example shows a middleware function with no mount path. The function is executed every time the app receives a request.
4040

@@ -249,9 +249,9 @@ functions that were previously included with Express are now in separate modules
249249

250250
Express has the following built-in middleware functions:
251251

252-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
252+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
255255

256256
<h2 id='middleware.third-party'>Third-party middleware</h2>
257257

0 commit comments

Comments
 (0)