tps://www.hanselman.com/blog/TinyHappyFeatures2ASPNETWebAPIInVisualStudio2012.aspx
Quote: Scott, Do you know of anyway that a dynamic parameter will work for a request that contains XML? For example: POST http://localhost:52753/api/Test HTTP/1.1 User-Agent: Fiddler Host: localhost:52753 Accept: application/xml Content-Type: application/xml; charset=utf-8 <root> <message>Hello and have this bind into: public dynamic Post([FromBody]dynamic xml) { return xml; } -------------------- Andy Cohen Thursday, January 10, 2013 6:11:52 PM UTC Andy - No, but this isn't a WebAPI issue. I don't think there are any XML parsers on .NET that use Dynamic. If there were, you could write a model binder quickly.
GlobalConfiguration.Configuration.Formatters.XmlFormatter.UseXmlSerializer = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)