Skip to content

Commit ef32d3d

Browse files
authored
Update routing.md (#1397) (#1481)
1 parent e885be2 commit ef32d3d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

en/guide/routing.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ app.get(/.*fly$/, (req, res) => {
158158
})
159159
```
160160

161-
<h3 id="route-parameters">Route parameters</h3>
161+
<h2 id="route-parameters">Route parameters</h2>
162162

163163
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.
164164

@@ -280,17 +280,17 @@ app.get('/example/d', [cb0, cb1], (req, res, next) => {
280280

281281
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.
282282

283-
| Method | Description
284-
|----------------------|--------------------------------------
285-
| [res.download()](/{{ page.lang }}/4x/api.html#res.download) | Prompt a file to be downloaded.
286-
| [res.end()](/{{ page.lang }}/4x/api.html#res.end) | End the response process.
287-
| [res.json()](/{{ page.lang }}/4x/api.html#res.json) | Send a JSON response.
288-
| [res.jsonp()](/{{ page.lang }}/4x/api.html#res.jsonp) | Send a JSON response with JSONP support.
289-
| [res.redirect()](/{{ page.lang }}/4x/api.html#res.redirect) | Redirect a request.
290-
| [res.render()](/{{ page.lang }}/4x/api.html#res.render) | Render a view template.
291-
| [res.send()](/{{ page.lang }}/4x/api.html#res.send) | Send a response of various types.
292-
| [res.sendFile()](/{{ page.lang }}/4x/api.html#res.sendFile) | Send a file as an octet stream.
293-
| [res.sendStatus()](/{{ page.lang }}/4x/api.html#res.sendStatus) | Set the response status code and send its string representation as the response body.
283+
| Method | Description |
284+
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
285+
| [res.download()](/{{ page.lang }}/4x/api.html#res.download) | Prompt a file to be downloaded. |
286+
| [res.end()](/{{ page.lang }}/4x/api.html#res.end) | End the response process. |
287+
| [res.json()](/{{ page.lang }}/4x/api.html#res.json) | Send a JSON response. |
288+
| [res.jsonp()](/{{ page.lang }}/4x/api.html#res.jsonp) | Send a JSON response with JSONP support. |
289+
| [res.redirect()](/{{ page.lang }}/4x/api.html#res.redirect) | Redirect a request. |
290+
| [res.render()](/{{ page.lang }}/4x/api.html#res.render) | Render a view template. |
291+
| [res.send()](/{{ page.lang }}/4x/api.html#res.send) | Send a response of various types. |
292+
| [res.sendFile()](/{{ page.lang }}/4x/api.html#res.sendFile) | Send a file as an octet stream. |
293+
| [res.sendStatus()](/{{ page.lang }}/4x/api.html#res.sendStatus) | Set the response status code and send its string representation as the response body. |
294294

295295
<h2 id="app-route">app.route()</h2>
296296

0 commit comments

Comments
 (0)