Sunday 23 June 2013

Web API POST

http://stackoverflow.com/questions/11142702/aspnet-webapi-post-parameter-is-null-when-sending-xml
http://forums.asp.net/t/1787686.aspx/1
  • Add Content Type:
  • User-Agent: Fiddler
  • Content-Type: application/xml (this is for the server)
  • Accept: application/xml (this is for the client)
  • For DataContractSerializer, add the namespace to the root of the posted data or remove namespace from the DataContract: