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