Hi!
In my WebApiConfig file, I have the following line so JSON is returned by default:
config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
The problem is, the returned Content Type is then "text/html." That works, but it's messing up the resource trying to get the JSON as it's expecting the Content Type to be "application/json."
I tried changing the value to "application/json," but then it throws an Exception.
What am I doing wrong?
Thanks!
-Eric