Reputation: 301
This is weird! I create OData Web API with ASP.NET MVC 5. Return IQueriable from the controller, nothing special.
But in some reason it constantly returns JSON when I need XML.
I send GET from Fiddler with Accept: application/xml - no reaction.
I try to force removing JsonFormater in the server code - no reaction again.
It always returns JSON. What do I miss?
Upvotes: 1
Views: 921
Reputation: 17182
Try with - Accept: application/atom+xml.
AFAIK in OData V3 there are three protocals (ref) -
Upvotes: 2