I am using Azure SDK Oct 2012. ODataLib dependency in the Storage Client Library for .NET is resolved through the ODataLib (version 5.0.2). When I fire a query on azure tables I get following exception:
A supported MIME type could not be found that matches the content type
of the response. None of the supported type(s) 'application/atom+xml;type=feed,
application/atom+xml, application/json;odata=verbose' matches the content type
'text/xml;charset=utf-8'.
When I used Fidler to track the header values of HTTP,
for Request it was
Accept: application/atom+xml,application/xml
for Response it was
Content-Type: text/xml;charset=utf-8
I am sure it is happening because of the Proxy at my organisation. (bcs same code works fine with no Proxy).
So can anyone help me how to fix this problem?
1) Is there a way to set the Content-Type while firing query?
2) Or ODataLib is does not handle Content-Type: text/xml;charset=utf-8 ?
We solved the problem as follows.
With the help of “Costomize Rules” option under “Rules” menu of Fidler, open “CustomRules.js” file. There exists a function called “OnBeforeResponse“. Add below code inside this function to change response Content-Type before data is given to application (API).