Testing Web Api post with fiddler

It took me a minute to figure out how to test a Web Api POST method that took an array of strings so I thought I would share and save you that minute.

I used Fiddler.

In Fiddler’s Composer tab, change GET to POST and enter the address of your Web.api controller (“http://yoursite.com/api/yourControllerName”).

Fiddler Post dropdown

In the Request headers tab, enter a JSON content type. ¬†(“Content-Type: application/json; charset=utf-8”)

Fiddler Request Headers

You need more info here but Fiddler will fill the rest for you when you hit execute.

Put your JSON string array in the Request Body

Fiddler Request body JSON string array

Hit Execute on fiddler. Fiddler will populate the content length and post your reqeust.

Sit back and enjoy the JSONy goodness.

Did you like this? Share it: