Web API, by default returns XML and JSON. You can override the behavior to always return a preferred result. Either by adding a header, or by changing the Web API setting.
One easy way to do this is to remove the XML support in the configuration itself,
Another way that I talked about was to add "Content-Type" header and set the value to "application/json". Or when you add a header (this header goes with the Request, typically with the HttpClient itself) of "Accept" and set it to "application/json".
Personally saying, Web API always returns JSON format content in my case. I have never stumbled upon a case where I get to have the XML data.
Here are the helpful threads from internet:
If you are using jQuery to get the data, you should always consider using
function. It does all of the header settings for you itself. :-)