Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Web API 2 / REST - why does Chrome sometimes display XML, sometimes JSON?

$
0
0

Hi all;

First off, do I need to specify "Web API 2" in my questions? It's still in beta and is quite different so I am assuming that it is necessary. If not, please let me know.

When I run under the VS2013 debugger, and put in a REST url to test my code, it sometimes comes back as XML and sometimes as JSON. I'd prefer to always get JSON.

According to Fiddler the request is "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" in both cases.

Any idea why?

thanks - dave


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>