From fbfeffa09010e77636cbcc9ad99a8bf561af8c7c Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Wed, 23 Oct 2013 23:44:22 -0700 Subject: [PATCH] statusCode alias for status for node --- lib/context.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/context.js b/lib/context.js index a877ddd..6c6e6bc 100644 --- a/lib/context.js +++ b/lib/context.js @@ -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.