I have added both an output formatted and an input formatted for xml for my API solution
//add formatter to support XML media type results(application/xml)
setupAction.OutputFormatters.Add(new XmlDataContractSerializerOutputFormatter());
//add formatter to support XML media type request(application/xml)
setupAction.InputFormatters.Add(new XmlDataContractSerializerInputFormatter());
but when I make a request using an accept header of application/xml I get a 406 has anyone else ran into this?
The content type is application/json
---- FIXED ----
If the object that the controller action returns has a constructor and the accept header is application/xml then the response will be a 406. Simply removed the constructor and then I could return XML.