ASP.NET Web API does content negotiation by default – will return XML or JSON or other type based on the Accept
header. I don't need / want this, is there a way (like an attribute or something) to tell Web API to always return JSON?
ASP.NET Web API – How to Always Return JSON
asp.net-mvcasp.net-web-api
Best Answer
Clear all formatters and add Json formatter back.
EDIT
I added it to
Global.asax
insideApplication_Start()
.