Skip to content
Myr

Added `res.set(field, val)` as an alternative to `res.header()`

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 c729d62 · Browse files · 1 file+14 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+14 added−0 removed

  • other:+14 added−0 removed

1 file+14 added−0 removed

modified:lib/response.js+14 added
252 unmodified lines
253 });254};255256/**257 * Set header field `name` to `val`.258 *259 * @param {String} name260 * @param {String} val261 * @return {ServerResponse} for chaining262 * @api public263 */264265res.set = function(name, val){266 this.setHeader(name, val);267 return this;268};269270/**271 * Set or get response header `name` with optional `val`.272 *273 * @param {String} name274 * @param {String} val
151 unmodified lines