Skip to content
Myr

docs for res.status()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent b04be51 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:lib/response.js+8 added
138 unmodified lines
139 this.header('Content-Type', 'application/json');140 return this.send(JSON.stringify(obj), headers, status);141};142143/**144 * Set status `code`.145 *146 * @param {Number} code147 * @return {ServerResponse}148 * @api public149 */150151res.status = function(code){152 this.statusCode = code;153 return this;154};
305 unmodified lines