File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
unreleased
2
2
==========
3
3
4
+ * Add ` express.raw ` to parse bodies into ` Buffer `
4
5
* Improve error message for non-strings to ` res.sendFile `
5
6
* Improve error message for ` null ` /` undefined ` to ` res.status `
6
7
* Support multiple hosts in ` X-Forwarded-Host `
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ exports.Router = Router;
77
77
78
78
exports . json = bodyParser . json
79
79
exports . query = require ( './middleware/query' ) ;
80
+ exports . raw = bodyParser . raw
80
81
exports . static = require ( 'serve-static' ) ;
81
82
exports . urlencoded = bodyParser . urlencoded
82
83
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ describe('exports', function(){
14
14
assert . equal ( express . json . length , 1 )
15
15
} )
16
16
17
+ it ( 'should expose raw middleware' , function ( ) {
18
+ assert . equal ( typeof express . raw , 'function' )
19
+ assert . equal ( express . raw . length , 1 )
20
+ } )
21
+
17
22
it ( 'should expose static middleware' , function ( ) {
18
23
assert . equal ( typeof express . static , 'function' )
19
24
assert . equal ( express . static . length , 2 )
You can’t perform that action at this time.
0 commit comments