Skip to content
Myr

Add express.text to parse bodies into string

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

closes #3455

authored by Ilya Guterman · committed by Douglas Christopher Wilson · parent 11192bd · Browse files · 3 files+7 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

3 files+7 added−0 removed

  • tests:+5 added−0 removed
  • other:+2 added−0 removed

3 files+7 added−0 removed

modified:lib/express.js+1 added
modified:test/exports.js+5 added
22 unmodified lines
23 assert.equal(typeof express.static, 'function')24 assert.equal(express.static.length, 2)25 })2627 it('should expose text middleware', function () {28 assert.equal(typeof express.text, 'function')29 assert.equal(express.text.length, 1)30 })3132 it('should expose urlencoded middleware', function () {33 assert.equal(typeof express.urlencoded, 'function')34 assert.equal(express.urlencoded.length, 1)35 })
52 unmodified lines
modified:History.md+1 added
1unreleased2==========34 * Add `express.raw` to parse bodies into `Buffer`5 * Add `express.text` to parse bodies into string6 * Improve error message for non-strings to `res.sendFile`7 * Improve error message for `null`/`undefined` to `res.status`8 * Support multiple hosts in `X-Forwarded-Host`9 * deps: accepts@~1.3.7
3453 unmodified lines