multipart data POST using python requests: no multipart boundary was found

后端 未结 3 1000
[愿得一人]
[愿得一人] 2020-12-08 19:26

I have a form-data as well as file to be sent in the same POST. For ex, {duration: 2000, file: test.wav}. I saw the many threads here on multipart/form-data posting using py

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 20:20

    You should NEVER set that header yourself. We set the header properly with the boundary. If you set that header, we won't and your server won't know what boundary to expect (since it is added to the header). Remove your custom Content-Type header and you'll be fine.

提交回复
热议问题