I have a webapp that is currently set to output text in JSON format. I changed this by adding the following to the webapiconfig.sys for JSOn support. Works fine. And when I remove support, XML works fine.
config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
However, I want an additional function in the controller to output items to XML as well. Is there a way to send the header with the output to display in XML? Should I change something in the webapiconfig?