0

I want to find samples of how to work with Mobile/Web App by sending POST.
Previously in Mobile Services it was possible to send POST like this:

POST /tables/table_name HTTP/1.1
Host: http://arduinounoserver.azure-mobile.net/
X-ZUMO-APPLICATION: YaRWxxxxzKGRxxxxLPiNxxxxXYOvxxxx
{"value": 234}

But now authentication was absolutely changed.
How to do it now and is it possible to find somewhere POST samples?

Have found only Table Service REST API but it's still not clear for me

Alexej Sommer
  • 2,677
  • 1
  • 14
  • 25

1 Answers1

3

you can still use next URL notation to access tables:

https://yoursite/tables/tablename

but, you can get an error:

{"error":"An invalid API version was specified in the request, this request needs to specify a ZUMO-API-VERSION of 2.0.0."}

so with Web App Easy Table you should use next ZUMO-header, for example

POST https://vyutest.azurewebsites.net/Tables/Test HTTP/1.1

Accept: application/json 
Content-Type: application/json 
Content-Length: 49 
ZUMO-API-VERSION: 2.0.0 
Host: vyutest.azurewebsites.net

{"text":"Complete the tutorial","complete":false}

It works.

  • Thanks, Vladimir! And what is about authentification? That would be great iot sample. – Alexej Sommer Apr 26 '16 at 15:02
  • 1
    For IoT, it's general that the IoT device uses IoTHub or EventHubs to inject data into the system - that's custom made for the device side. Then you look at the data with a mobile or web client - there are demos on user authentication for the various devices in samples and on the azure.com website. – Adrian Hall Apr 26 '16 at 16:38
  • Have found [this link](https://create.arduino.cc/projecthub/doncoleman/mkr1000-temp-and-humidity-sensor-8f22ed?ref=platform&ref_id=424_recent___&offset=31) about Arduino and Azure direct connection. Thanks, @AdrianHall, your recommendation was also very helpful – Alexej Sommer Apr 27 '16 at 06:03
  • As I have understand to send POST message for Azure Mobile/Web app is possible, but it's not recommended way. – Alexej Sommer Apr 29 '16 at 08:17