commit
432d876e42
3 changed files with 31 additions and 12 deletions
|
@ -307,3 +307,15 @@ this.acceptsLanguages();
|
||||||
// => ["es", "pt", "en"]
|
// => ["es", "pt", "en"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### req.idempotent
|
||||||
|
|
||||||
|
Check if the request is idempotent.
|
||||||
|
|
||||||
|
### req.socket
|
||||||
|
|
||||||
|
Return the request socket.
|
||||||
|
|
||||||
|
### req.get(field)
|
||||||
|
|
||||||
|
Return request header.
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,18 @@
|
||||||
|
|
||||||
Response header object.
|
Response header object.
|
||||||
|
|
||||||
|
### res.socket
|
||||||
|
|
||||||
|
Request socket.
|
||||||
|
|
||||||
### res.status
|
### res.status
|
||||||
|
|
||||||
Get response status. By default, `res.status` is not set unlike node's `res.statusCode` which defaults to `200`.
|
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=
|
### res.status=
|
||||||
|
|
||||||
Set response status via numeric code or case-insensitive string:
|
Set response status via numeric code or case-insensitive string:
|
||||||
|
@ -243,3 +251,13 @@ this.response.lastModified = new Date();
|
||||||
```js
|
```js
|
||||||
this.response.etag = crypto.createHash('md5').update(this.body).digest('hex');
|
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`.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -459,17 +459,6 @@ module.exports = {
|
||||||
return this.accept.languages.apply(this.accept, arguments);
|
return this.accept.languages.apply(this.accept, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Vary on `field`.
|
|
||||||
*
|
|
||||||
* @param {String} field
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
vary: function(field){
|
|
||||||
this.append('Vary', field);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the incoming request contains the "Content-Type"
|
* Check if the incoming request contains the "Content-Type"
|
||||||
* header field, and it contains any of the give mime `type`s.
|
* header field, and it contains any of the give mime `type`s.
|
||||||
|
|
Loading…
Reference in a new issue