Skip to content

Commit ddf16b0

Browse files
author
Sefi Krausz
committed
changes
1 parent 86e8a10 commit ddf16b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/targets/node/unirest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ module.exports = function (source, options) {
7272

7373
part.body = 'fs.createReadStream("' + param.fileName + '")'
7474
} else if (param.value) {
75-
part.body = param.value
75+
const { name } = param || 'body'
76+
part[name] = param.value
7677
}
7778

7879
if (part.body) {
@@ -83,7 +84,6 @@ module.exports = function (source, options) {
8384
multipart.push(part)
8485
}
8586
})
86-
console.log('unirest.js 86', multipart)
8787
code.push('req.multipart(%s);', JSON.stringify(multipart, null, opts.indent))
8888
break
8989

0 commit comments

Comments
 (0)