How to post multipart/form-data with node.js superagent

后端 未结 4 1692
独厮守ぢ
独厮守ぢ 2021-02-02 11:09

I am trying to send the content-type in my superagent post request to multipart/form-data.

var myagent = superagent.agent();

myagent
  .post(\'http://localhost/         


        
4条回答
  •  悲&欢浪女
    2021-02-02 11:25

    Try .type('form') instead of .set('Content-Type', 'multipart/form-data')

    See http://visionmedia.github.io/superagent/#setting-the-content-type

提交回复
热议问题