context delegates: response.lastModified and response.etag

only doing setters because i think getters would be pretty confusing.
This commit is contained in:
Jonathan Ong 2013-11-20 14:09:49 -08:00
parent dc873d66e2
commit 9d7dd437d7
2 changed files with 18 additions and 0 deletions

View file

@ -62,6 +62,8 @@
- `ctx.redirect()`
- `ctx.attachment()`
- `ctx.set()`
- `ctx.lastModified=`
- `ctx.etag=`
## API

View file

@ -379,6 +379,22 @@ module.exports = {
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().
*/