도움을 주신 분들께 진심으로 감사드립니다.
웹 API OData 프로젝트가 있으며 모든 것이 잘 작동합니다. 헤더 요청을 지정하는 대신 $ format 매개 변수를 사용하여 JSON 대신 xml을 반환하려고합니다. 작동하지 않습니다. 나는이 방법을 시도했다 :
http://localhost:3845/api/Customer?$format=application/xml
http://localhost:3845/api/Customer?$format=xml
http://localhost:3845/api/Customer?$format=application/xml;odata.metadata=full
모두 성공하지 못함. 이 기사는 가능하다고 말합니다 : http://blogs.msdn.com/b/webdev/archive/2014/03/13/getting-started-with-asp-net-web-api-2-2-for-odata-v4-0.aspx
NuGet 패키지를 모두 업데이트했지만 요청이 항상 무시되고 그 대신 매번 JSON이 발생합니다.
다시 한번 감사드립니다. 감사합니다 ...
감사합니다. 이순신, 시간을내어 주셔서 감사합니다. – DanielG