How to use postman to test formdata?

forms, json, postman

Solution

Yes finally I have made it work. What I was doing wrong was not setting all the fields of the FormData() object ie, I didn't set the fields such as orderId because its value was null. When I set all the field values even if they were null, it worked. And also there was no need to set the Content-Type when you are sending a multipart/form-data...

Problem

How can I use postman plugin of Google Chrome to send a FormData() object to a webapi using POST. The FormData() object has form fields personID and messageBody appended to it. I tried something like this but to no avail: ``` URL of the webapi: http://localhost/<<appName>>/api/v1/message Headers: Accept:application/json Content-Type:multipart/form-data; boundary=---XXX--- form-data: personID:1 (Text) messageBody:Hello (Text) ```

Original source

Related problems