Skip to content
Myr

docs for req.get()

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 f13ea34 · Browse files · 2 files+13 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+13 added−2 removed

  • other:+13 added−2 removed

2 files+13 added−2 removed

modified:docs/guide.md+11 added
751 unmodified lines
752To utilize urlencoded request bodies, _req.body_753should be an object. This can be done by using754the _express.bodyParser middleware.755756### req.get(field, param)757758 Get _field_'s _param_ value, defaulting to '' when the _param_759 or _field_ is not present.760761 req.get('content-disposition', 'filename');762 // => "something.png"763764 req.get('Content-Type', 'boundary');765 // => "--foo-bar-baz"766767### req.flash(type[, msg])768769Queue flash _msg_ of the given _type_.770
624 unmodified lines
modified:lib/request.js+2 added-2 removed
68 unmodified lines
69 * Get `field`'s `param` value, defaulting to ''.70 *71 * Examples:72 *73 * req.get('content-disposition', 'filename');74 * // => "something.png"73 * req.get('content-disposition', 'filename');74 * // => "something.png"75 *76 * @param {String} field77 * @param {String} param78 * @return {String}
231 unmodified lines