Skip to content
Myr

more docs for req.accepts(arr)

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

  • other:+7 added−1 removed

1 file+7 added−1 removed

modified:lib/request.js+7 added-1 removed
72 unmodified lines
73 * req.accepts('text/plain');74 * req.accepts('application/json');75 * // => true76 *77 * // Accept: text/*; application/json78 * req.accepts('image/png');79 * req.accepts('png');80 * // => false81 *82 * // Accept: text/*; application/json83 * req.accepts(['html', 'json']);84 * // => "html"85 *86 * // Accept: text/*; q=.5, application/json87 * req.accepts(['text/html', 'application/json']);86 * // => "text/html"88 * // => "application/json"89 *90 * // Accept: text/plain91 * req.accepts(['text/html', 'application/json']);92 * // => undefined93 *94 * @param {String|Array} type(s)95 * @return {Boolean|String}96 * @api public97 */
294 unmodified lines