Skip to content

Commit

Permalink
docs(Request): Restructure how aliases are documented
Browse files Browse the repository at this point in the history
  • Loading branch information
nwoltman committed Jun 28, 2019
1 parent 27c7328 commit 113ea10
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions docs/Request.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ app.get('/user/:id', function(req, res) {

**Properties:**

+ [`.authority`](#reqauthority)
+ [`.body`](#reqbody)
+ [`.headers`](#reqheaders)
+ [`.host`](#reqhost)
+ [`.host`](#reqhost) (_alias:_ `.authority`)
+ [`.hostname`](#reqhostname)
+ [`.href`](#reqhref)
+ [`.method`](#reqmethod)
+ [`.origin`](#reqorigin)
+ [`.params`](#reqparams)
+ [`.path`](#reqpath)
+ [`.protocol`](#reqprotocol)
+ [`.protocol`](#reqprotocol) (_alias:_ `.scheme`)
+ [`.query`](#reqquery)
+ [`.querystring`](#reqquerystring)
+ [`.scheme`](#reqscheme)
Expand All @@ -35,10 +34,6 @@ app.get('/user/:id', function(req, res) {

## Properties

### `req.authority`

HTTP/2-style alias for [`req.host`](#reqhost).

### `req.body`

Defaults to `undefined`. Is set to the parsed request body if a
Expand Down Expand Up @@ -73,7 +68,8 @@ req.headers

### `req.host`

*Read-only*
*Read-only*<br>
Alias: `req.authority` (from the HTTP/2 `:authority` header)

The request host (`hostname:port`) if available. When the [`trustProxy`](Medley.md#trustproxy)
setting is enabled, uses the `X-Forwarded-Host` header first, then the `Host` header.
Expand Down Expand Up @@ -153,7 +149,8 @@ req.path // '/status/user'

### `req.protocol`

*Read-only*
*Read-only*<br>
Alias: `req.scheme` (from the HTTP/2 `:scheme` header)

The request protocol (e.g. "http" or "https"). Supports reading the `X-Forwarded-Proto`
header when the [`trustProxy`](Medley.md#trustproxy) setting is enabled.
Expand Down Expand Up @@ -188,10 +185,6 @@ req.querystring // 'a=1&b=value'
req.querystring // ''
```

### `req.scheme`

HTTP/2-style alias for [`req.protocol`](#reqprotocol).

### `req.search`

*Read-only*
Expand Down

0 comments on commit 113ea10

Please sign in to comment.