Skip to content

Commit

Permalink
Add octet-stream parser
Browse files Browse the repository at this point in the history
Unfortunately it can't buffer by default
  • Loading branch information
kornelski committed Jan 25, 2017
1 parent 2f7bab0 commit 5615a81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/node/parsers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
exports['application/x-www-form-urlencoded'] = require('./urlencoded');
exports['application/json'] = require('./json');
exports.text = require('./text');
exports.image = require('./image');

var binary = require('./image');
exports['application/octet-stream'] = binary;
exports.image = binary;
2 changes: 1 addition & 1 deletion test/node/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ describe('exports', function(){

it('should expose .parse', function(){
Object.keys(request.parse)
.should.eql(['application/x-www-form-urlencoded', 'application/json', 'text', 'image']);
.should.eql(['application/x-www-form-urlencoded', 'application/json', 'text', 'application/octet-stream', 'image']);
})
})

0 comments on commit 5615a81

Please sign in to comment.