context delegates: response.lastModified and response.etag
only doing setters because i think getters would be pretty confusing.
This commit is contained in:
parent
dc873d66e2
commit
9d7dd437d7
2 changed files with 18 additions and 0 deletions
|
@ -62,6 +62,8 @@
|
||||||
- `ctx.redirect()`
|
- `ctx.redirect()`
|
||||||
- `ctx.attachment()`
|
- `ctx.attachment()`
|
||||||
- `ctx.set()`
|
- `ctx.set()`
|
||||||
|
- `ctx.lastModified=`
|
||||||
|
- `ctx.etag=`
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,22 @@ module.exports = {
|
||||||
return this.request.type;
|
return this.request.type;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delegate to Response#lastModified=.
|
||||||
|
*/
|
||||||
|
|
||||||
|
set lastModified(val) {
|
||||||
|
this.response.lastModified = val;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delegate to Response#etag=.
|
||||||
|
*/
|
||||||
|
|
||||||
|
set etag(val) {
|
||||||
|
this.response.etag = val;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delegate to Request#accepts().
|
* Delegate to Request#accepts().
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue