Community discussions

MikroTik App
 
Chiverel
newbie
Topic Author
Posts: 46
Joined: Fri Jan 12, 2018 7:28 pm

Azure Storage Table POST issue

Sat Oct 01, 2022 3:22 pm

Hi,

I want to upload some data from ROS 7 to Azure Tables via API and SAS tokens, but I'm facing an issue.

First of all the curl/postman sample works fine:
curl --location --request POST 'https://instance.table.core.windows.net/tablename?SAS' \
--header 'Content-Type: application/json' \
--data-raw '{
    "PartitionKey": "value1",
    "RowKey": "value2"
}'
I can also get data from Azure via GET request
/tool fetch mode=https http-header-field="Accept:*/*" url="https://instance.table.core.windows.net/tablename?SAS" http-method=get
But the POST call fails with 415 Unsupported Media Type:
/tool fetch mode=https http-header-field="Accept:*/*;Content-Type:application/json;" url="https://instance.table.core.windows.net/tablename?SAS" http-method=post http-data="{\"PartitionKey\":\"value1\",\"RowKey\":\"value2\"}" 
Do you have any hints what's wrong or what topic to look for? I tried searching but haven't found the answer.

Thanks in advance for any hints!
 
Chiverel
newbie
Topic Author
Posts: 46
Joined: Fri Jan 12, 2018 7:28 pm

Re: Azure Storage Table POST issue  [SOLVED]

Mon Oct 03, 2022 8:46 pm

I must have read Wiki more carefully, the issue was in headers values, those are comma separated
Content-Type:application/json,Accept:*/*
Seems to be working after that fix :)

Who is online

Users browsing this forum: diamuxin, loloski and 29 guests