Skip to content
Myr

docs

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 d6d16b7 · Browse files · 1 file+4 added−3 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+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:lib/request.js+4 added-3 removed
56 unmodified lines
57 }58};5960/**61 * Check if the given `type(s)` is acceptable,62 * otherwise you should respond with 406 "Not Acceptable".61 * Check if the given `type(s)` is acceptable, returning62 * the best match when true, otherwise `undefined`, in which63 * case you should respond with 406 "Not Acceptable".64 *65 * Examples:66 * 67 * // Accept: text/html
24 unmodified lines
92 * req.accepts(['text/html', 'application/json']);93 * // => undefined94 *95 * @param {String|Array} type(s)95 * @return {Boolean|String}96 * @return {String}97 * @api public98 */99100req.accepts = function(type){
292 unmodified lines