Node.js - generate multipart/form-data

纵饮孤独 提交于 2019-12-04 13:04:44
thejh

fermata looks like it might be what you're looking for. From the github page:

fermata.json("http://example.com/some/action").post({
  'Content-Type':"multipart/form-data"
}, {
  fileField: form.input.file || {data:nodeBuffer, name:"", type:""}
}, callback)

request supports multipart/form-data or if you're just looking to create the content body, try form-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!