On 18 August 2015 at 08:28, DotNet Dude <adotnetd...@gmail.com> wrote:

> Is this what you're after?
> http://www.yasserblog.com/2013/07/mvc-web-api-customized-xml-output.html
>

This guy is reshaping the response XML by clever means which I have noted
as useful in my memory banks. However, he knows he's responding with xml,
but I'm in the position where I have to adjust the response depending upon
which serializer is "active", and I don't know which one it is.

Remember that you can register your own serializers, so it's possible that
neither the XML or JSON one is "active". Simply looking at the request
Accept header value is a hack because I have used AddQueryStringMapping so
putting ?format=json on the uri will override the Accept.

*GK*

Reply via email to