diff --git a/en/guide/routing.md b/en/guide/routing.md index 0660dab23a..08da7875cf 100755 --- a/en/guide/routing.md +++ b/en/guide/routing.md @@ -158,7 +158,7 @@ app.get(/.*fly$/, (req, res) => { }) ``` -

Route parameters

+

Route parameters

Route parameters are named URL segments that are used to capture the values specified at their position in the URL. The captured values are populated in the `req.params` object, with the name of the route parameter specified in the path as their respective keys. @@ -280,17 +280,17 @@ app.get('/example/d', [cb0, cb1], (req, res, next) => { The methods on the response object (`res`) in the following table can send a response to the client, and terminate the request-response cycle. If none of these methods are called from a route handler, the client request will be left hanging. -| Method | Description -|----------------------|-------------------------------------- -| [res.download()](/{{ page.lang }}/4x/api.html#res.download) | Prompt a file to be downloaded. -| [res.end()](/{{ page.lang }}/4x/api.html#res.end) | End the response process. -| [res.json()](/{{ page.lang }}/4x/api.html#res.json) | Send a JSON response. -| [res.jsonp()](/{{ page.lang }}/4x/api.html#res.jsonp) | Send a JSON response with JSONP support. -| [res.redirect()](/{{ page.lang }}/4x/api.html#res.redirect) | Redirect a request. -| [res.render()](/{{ page.lang }}/4x/api.html#res.render) | Render a view template. -| [res.send()](/{{ page.lang }}/4x/api.html#res.send) | Send a response of various types. -| [res.sendFile()](/{{ page.lang }}/4x/api.html#res.sendFile) | Send a file as an octet stream. -| [res.sendStatus()](/{{ page.lang }}/4x/api.html#res.sendStatus) | Set the response status code and send its string representation as the response body. +| Method | Description | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| [res.download()](/{{ page.lang }}/4x/api.html#res.download) | Prompt a file to be downloaded. | +| [res.end()](/{{ page.lang }}/4x/api.html#res.end) | End the response process. | +| [res.json()](/{{ page.lang }}/4x/api.html#res.json) | Send a JSON response. | +| [res.jsonp()](/{{ page.lang }}/4x/api.html#res.jsonp) | Send a JSON response with JSONP support. | +| [res.redirect()](/{{ page.lang }}/4x/api.html#res.redirect) | Redirect a request. | +| [res.render()](/{{ page.lang }}/4x/api.html#res.render) | Render a view template. | +| [res.send()](/{{ page.lang }}/4x/api.html#res.send) | Send a response of various types. | +| [res.sendFile()](/{{ page.lang }}/4x/api.html#res.sendFile) | Send a file as an octet stream. | +| [res.sendStatus()](/{{ page.lang }}/4x/api.html#res.sendStatus) | Set the response status code and send its string representation as the response body. |

app.route()