0

I am trying with node js request module to post some formData. My formData contains fields (file attachments) which I have to send with same name to the server. But my formData is being sent with only one attachment which is the last I have given in the set.

I want to know how to post with formData having same name for more than one field.

1 Answer 1

1

I can do that with unirest module in node js. I was having trouble with the authentication. But anyway if your server is using Basic auth you can encode your username and password string with base64 and set the Authorization header with that value. I am posting my answer because I took one day to figure out how to post attachments with same field name and finally unirest gave me a solution.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.