How to use postman to test formdata?

rkshakya99 picture rkshakya99 · May 21, 2014 · Viewed 69.6k times · Source

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)

Answer

Abhinav picture Abhinav · May 21, 2014

Postman has a form-data POST body option that automatically does this for you.