update document
This commit is contained in:
parent
788bf97d94
commit
420a6154bc
2 changed files with 35 additions and 1 deletions
|
@ -307,3 +307,19 @@ this.acceptsLanguages();
|
|||
// => ["es", "pt", "en"]
|
||||
```
|
||||
|
||||
### req.idempotent
|
||||
|
||||
Check if the request is idempotent.
|
||||
|
||||
### req.socket
|
||||
|
||||
Return the request socket.
|
||||
|
||||
### req.vary(field)
|
||||
|
||||
Vary on `field`.
|
||||
|
||||
### req.get(field)
|
||||
|
||||
Return request header.
|
||||
|
||||
|
|
|
@ -10,10 +10,18 @@
|
|||
|
||||
Response header object.
|
||||
|
||||
### res.socket
|
||||
|
||||
Request socket.
|
||||
|
||||
### res.status
|
||||
|
||||
Get response status. By default, `res.status` is not set unlike node's `res.statusCode` which defaults to `200`.
|
||||
|
||||
### res.statusString
|
||||
|
||||
Response status string
|
||||
|
||||
### res.status=
|
||||
|
||||
Set response status via numeric code or case-insensitive string:
|
||||
|
@ -243,3 +251,13 @@ this.response.lastModified = new Date();
|
|||
```js
|
||||
this.response.etag = crypto.createHash('md5').update(this.body).digest('hex');
|
||||
```
|
||||
|
||||
### res.append(field, val)
|
||||
|
||||
Append `val` to header `field`.
|
||||
|
||||
### res.vary(field)
|
||||
|
||||
Vary on `field`.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue