This is a migrated thread and some comments may be shown as answers.

Compose Post request using Fiddler to send xml string

1 Answer 234 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Vinod
Top achievements
Rank 1
Vinod asked on 30 Jul 2014, 08:24 PM
Hi,

I am trying to test a ASP.NET Webapi method using fiddler. I have a method which accepts XML in the form of a string parameter. I know its not a good design, but I am in the process of porting a legacy WCF implementation to Webapi and initially I have to keep the method signature as is and then eventually I can make it to follow a better design. Anyway, so here is my method signature.

[HttpPost]
public int CreatePGT([FromBody] string pgtXml, [FromUri] string transactionId)
{
     return 10; // Some processing happens and actual implementation returns an id
}

How can I compose a request using following URL http://localhost:62050/api/proposal/CreatePGT?transactionId=ttt and post the following xml string in request body
<?xml version="1.0" encoding="UTF-8" ?><PGT  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="pgt.xsd">
<title>Test Proposal</title></PGT> 


1 Answer, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 30 Jul 2014, 09:43 PM
Hi, Vinod-- I think you're looking for something like this: http://stackoverflow.com/questions/19052280/how-to-post-xml-using-fiddler-to-asp-net-webapi

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Windows
Asked by
Vinod
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Share this question
or