0

Could you tell me how to test below mentioned complex webapi method by using fiddler or what ever extension ? Thanks in advance.

WebApi method :

 [HttpPost]
 [POST("Sponsors/MyFulfilled/{pledgeId}/{amount}")]
 public string MyFulfilled(int pledgeId, decimal amount, MyConfirmation mp)
        {
           //code here

            return "thanks";
        }

MyConfirmation class :

 public class MyConfirmation
        {
            public string checkoutid { get; set; }
        }

UPDATE:

I have used like this.But it's not working :(

pledgeId=5&amount=88&mp={
"checkoutid":"12"
}
Sampath
  • 63,341
  • 64
  • 307
  • 441
  • Any specific reason Fiddler is needed? Chrome has a nice extension to test REST. http://stackoverflow.com/questions/20591770/how-to-test-rest-api-using-chromes-extension-advanced-rest-client – lcryder Aug 14 '15 at 15:07
  • @lcryder OK, no problem.But I need to construct the above method for post request.So could you tell me how ? – Sampath Aug 14 '15 at 15:09
  • SoapUI has some pretty good utilities http://www.soapui.org/rest-testing/getting-started.html – JamieD77 Aug 14 '15 at 15:16
  • The link I provided shows how to do a POST...roughly...pledgeId=5&amount=88&mp=yourJSONMyConfirmationString – lcryder Aug 14 '15 at 15:17
  • @lcryder It's not working.Please see my UPDATE. – Sampath Aug 14 '15 at 15:29

1 Answers1

1

try wth the following configuration in fiddler:

Fiddler Configuration

Web API Method

Regards,

Julito Avellaneda
  • 2,335
  • 2
  • 17
  • 25