forwardemail / forwardemail/superagent
superagent should not set content-type when FormData is used
Open
- Dominant language
- JavaScript
- Stars
- 16.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, it took me quite some time to understand this one.
If you use FormData to post data to the server, then the content type needs to be something like `Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryjJoP...` but if you set .type to 'form' or to to juse 'multipart/form-data' then the request will happen, but the server will interpret the data wrongly.
I would like to suggest that you add a warning both in the documentation and in the code as it is quite easy to do this mistake.
Kind regards,
Tarjei
Contributor guide
Assessment
This issue has not been assessed yet.