Skip to content

Commit bb7f344

Browse files
author
Sefi Krausz
committed
changes
1 parent dfbcd5e commit bb7f344

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/index.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,18 @@ HTTPSnippet.prototype.prepare = function (request) {
127127
if (request.postData.params) {
128128
var form = new MultiPartForm()
129129

130-
const { value } = param || ''
131-
form.append(param.name,
132-
typeof value === 'string'
133-
? new Blob([value])
134-
: value
135-
, {
136-
filename: param.fileName || null,
137-
contentType: param.contentType || null
138-
})
130+
request.postData.params.forEach(function (param) {
131+
const { value } = param || ''
132+
form.append(param.name,
133+
typeof value === 'string'
134+
? new Blob([value])
135+
: value
136+
, {
137+
filename: param.fileName || null,
138+
contentType: param.contentType || null
139+
})
140+
})
141+
139142
// form.pipe(es.map(function (data, cb) {
140143
// request.postData.text += data
141144
// }))

0 commit comments

Comments
 (0)