Skip to content
Myr

add req.acceptsEncoding(name)

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 3b1597d · Browse files · 1 file+12 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+12 added−0 removed

  • other:+12 added−0 removed

1 file+12 added−0 removed

modified:lib/request.js+12 added
100 unmodified lines
101 return utils.accepts(type, this.get('Accept'));102};103104/**105 * Check if the given `encoding` is accepted.106 *107 * @param {String} encoding108 * @return {Boolean}109 * @api public110 */111112req.acceptsEncoding = function(encoding){113 return ~this.acceptedEncodings.indexOf(encoding);114};115116/**117 * Check if the given `charset` is acceptable,118 * otherwise you should respond with 406 "Not Acceptable".119 *120 * @param {String} charset
406 unmodified lines