statusCode alias for status
for node
This commit is contained in:
parent
6492f2ca4a
commit
fbfeffa090
1 changed files with 8 additions and 0 deletions
|
@ -110,6 +110,10 @@ module.exports = {
|
|||
get status() {
|
||||
return this.res.statusCode;
|
||||
},
|
||||
|
||||
get statusCode() {
|
||||
return this.res.statusCode;
|
||||
},
|
||||
|
||||
/**
|
||||
* Set response status code.
|
||||
|
@ -130,6 +134,10 @@ module.exports = {
|
|||
var noContent = 304 == this.status || 204 == this.status;
|
||||
if (noContent && this.body) this.body = null;
|
||||
},
|
||||
|
||||
set statusCode(val) {
|
||||
this.status = val;
|
||||
},
|
||||
|
||||
/**
|
||||
* Get response body.
|
||||
|
|
Loading…
Reference in a new issue