Is you "tweak" of the xml generic, ie. will happen to every xml response?
If so I'd imagine the method would be to override the default xml
serializer (or implement some interface) and tell web api to use your one
instead of the default. Testing which one is active by any means just seems
hacky. Or perhaps I've misunderstood

On Tue, Aug 18, 2015 at 7:56 AM, Greg Keogh <gfke...@gmail.com> wrote:

> Folks, in Web API when you sent an object back in the response it's
> automatically serialized as JSON or XML depending upon the Accept header.
> This is great, but I have to cheat the system slightly and send back
> manually tweaked XML only if the XML serializer is "active". Rather than
> look at the raw text of the request Accept headers, is there is more formal
> way of knowing which serializer is "active" (if this means anything) --
> *GK*
>

Reply via email to