Q: Advanced Rest Client - Using XML instead of JSON I am hitting the following controller and have a break point on return result;:
        [HttpGet]
        [ResponseType(typeof(PriceResponse))]
        [Route("Account/{id:int}/Price")]
        public IHttpActionResult Get(int id)
        {          
            var price = _priceService.GetPrice(id);
            var result = Ok(price);

            return result;
        }

I am manually changing the value of result.Formatters[0].SupportedMediaTypes[0].MediaType and result.Formatters[0].MediaTypeMappings[0].MediaType.MediaType from "application/json" to "application/xml".
However, when I look at the result in Chrome's Advanced Rest Client, it correctly shows Content-Type: application/xml; charset=utf-8 in the header, however the "raw" response body is still in JSON format.
How can I display it in XML instead?
EDIT: I have the following in the request's header:
Svc-Channel: 302
Accept: application/xml

I have tried clicking on Options and setting the drop down menu to "application/xml" however the body is still displayed in JSON.

A: I am going to assume (based off the Attributes) that you are using Web API.
What you are playing with here is called Content Negotiation. Web API has a nice default implementation of this that is documented here. The simplest way to control this is to use the "Accept" header and pass in the desired return type. Web Api will naturally take care of all of this through its pipeline. All you have to do to control this is use the "Accept" header in the request.
