curl "https://a.com?filename=myfile.dat&token=123" \
-v -u {email_address}:{password} \
-H "Content-Type: application/binary" \
--data-binary @file.dat -X POST
how can this curl request be parsed into a post format that js can use?
var formdata = new FormData();
formdata.append("filename",file);
formdata.append("token","123");
I write this, request error: 422 Unprocessable Entity