Reputation: 1642
I'm trying to create a table using this operation:
https://msdn.microsoft.com/en-us/library/azure/dd135729.aspx
with a json request body. However, all my efforts are rejected with the following response:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>JsonFormatNotSupported</code>
<message xml:lang="en-US">JSON format is not supported.
RequestId:41192a52-0002-007b-5334-b57662000000
Time:2016-05-23T20:48:17.4360778Z</message>
</error>
The error is mentioned here:
https://msdn.microsoft.com/en-us/library/azure/dd179438.aspx
But that's all I can find
Here's what I'm sending:
http://requestb.in/1l9sye21?inspect#1jmf39
Upvotes: 1
Views: 486
Reputation: 837
Adding to Adam's answer: You need to specify Storage Service Versions in requests when authenticated.
See https://msdn.microsoft.com/en-us/library/azure/dd894041.aspx for more details.
The storage service version used to authenticate with may be incompatible with the version used to process the request, which will lead to some features such as json not available, thus the REST request fails with error (415) JSON format is not supported.
.
Refer to https://github.com/Azure/azure-storage-net/issues/32 for some information, though it's with SAS rather than SKA.
Upvotes: 2
Reputation: 576
I think the problem is that you need to add the x-ms-version header:
x-ms-version: 2015-04-05
This is required when using Shared Key / Shared Key Lite auth for the Table Service. See https://msdn.microsoft.com/en-us/library/azure/dd894041.aspx for more information.
Upvotes: 3