I have a Web API project that returns some product data. It negotiates the return type correctly depending on the Accept header (JSON/XML) of the request. The problem is, if
FYI be careful of intercepting the text/html
media type because this will also format the 404 responses from your server. And in my case, this led to a potential security issue because:
window.location
or anything sinister