0

I am fairly new to web API and i'm currently following this tutorial I have only got as far as task 3 and i'm quite learning a lot.

As you can see the tutorial is using Internet Explorer and I am using Chrome .. for some reason Chrome is returning xml and IE is returning a json object. Should I worry about this or not? i'd love it if Chrome returned a Json object though..

Thank you

1 Answer 1

1

WebApi is pretty cool in that it will serialise it's output as JSON or XML based on the accept header sent by the browser.

I expect that Chrome's default is XML, and IE's is JSON.

I can't find a simple configuration change example for Chrome, with most information pointing to having to use a plugin to change the accept header. In Firefox the default is XML but you can adjust it with a config change.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.