Skip to content
Myr

Added Express.respond()

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

authored by visionmedia · committed by visionmedia · parent 9bdd59f · Browse files · 2 files+31 added−2 removed
This commit

State

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

Diff stats

2 files+31 added−2 removed

  • tests:+16 added−0 removed
  • other:+15 added−2 removed

2 files+31 added−2 removed

modified:lib/express.core.js+15 added-2 removed
19 unmodified lines
20 maxAge : 360021 },22 route : {23 callback : function() {24 Express.status('Not Found')25 'Not Found'24 Express.respond('Not Found')25 }26 }27 },28
153 unmodified lines
182 return this.response.status = code183 },184 185 /**186 * Set response _status_ and _body_.187 *188 * @param {string} body189 * @param {string, int} status190 * @return {string}191 * @api public192 */193 194 respond : function(body, status) {195 this.status(status || body)196 return body197 },198 199 /**200 * Sets _name_ header to _value_. When _value_201 * is not present the request header will be returned.202 *203 * @param {string} name
373 unmodified lines
modified:spec/spec.core.js+16 added