File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ var CodeBuilder = require('../../helpers/code-builder')
1717module . exports = function ( source , options ) {
1818 var opts = util . _extend ( {
1919 indent : ' ' ,
20- short : false
20+ short : false ,
21+ binary : false
2122 } , options )
2223
2324 var code = new CodeBuilder ( opts . indent , opts . indent !== false ? ' \\\n' + opts . indent : ' ' )
@@ -56,7 +57,10 @@ module.exports = function (source, options) {
5657 default :
5758 // raw request body
5859 if ( source . postData . text ) {
59- code . push ( '%s %s' , opts . short ? '-d' : '--data' , helpers . escape ( helpers . quote ( source . postData . text ) ) )
60+ code . push (
61+ '%s %s' , opts . binary ? '--data-binary' : ( opts . short ? '-d' : '--data' ) ,
62+ helpers . escape ( helpers . quote ( source . postData . text ) )
63+ )
6064 }
6165 }
6266
You can’t perform that action at this time.
0 commit comments