Skip to content
Myr

Doc typo

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

  • other:+11 added−11 removed

1 file+11 added−11 removed

modified:lib/express/request.js+11 added-11 removed
215 unmodified lines
216 * assertions again the request, for example if we need an expressive217 * way to check if our incoming request is an image, we can register "an image"218 * callback:219 * 220 * app.is('an image', function(req){221 * return 0 == req.headers['content-type'].indexOf('image');222 * });223 * 220 * app.is('an image', function(req){221 * return 0 == req.headers['content-type'].indexOf('image');222 * });223 * 224 * Now within our route callbacks, we can use to to assert content types225 * such as "image/jpeg", "image/png", etc.226 * 227 * app.post('/image/upload', function(req, res, next){228 * if (req.is('an image')) {229 * // do something230 * } else {231 * next();232 * }233 * });227 * app.post('/image/upload', function(req, res, next){228 * if (req.is('an image')) {229 * // do something230 * } else {231 * next();232 * }233 * });234 * 235 * @param {String} type236 * @return {Boolean}237 * @api public
34 unmodified lines