REST API do different browsers render different Data interchange (JSON / XML) -


i consuming new restful api 3rd party has developed sso api 1 of companies systems.

in documentation gives following examples of data interchange, find strange ie10 json returned, , chrome , firefox xml returned.

i assummed 1 data interchange type used rather multiple? when parse data going have check whether type json or xml first doesnt seem correct? shouldnt restful api define 1 data interchange type rather different ones different browsers?

examples:

chrome/firefox:

<verifytokenresponse xmlns:i="http://www.w3.org/2001/xmlschema-instance"xmlns="http://schemas.datacontract.org/2004/07/microssinglesignonservice.models"> <status>1</status> <tokenkey>test@testemail.com</tokenkey> </verifytokenresponse> 

ie10 json:

{"status":1,"tokenkey":"test@testemail.com"} 

i expect service respect http accept header.

i.e can specify prefer - xml or json

i expect response's content-type header indicate returned you.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -