I would provide two different methods. It's easier for you and easier for the end developers to understand.
Davy Sent from my iPhone > On 17 Aug 2015, at 23:56, 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