Azure 移动/Web 应用程序的 POST(从 Arduino 工作) [英] POST for Azure Mobile/Web App (working from Arduino)

查看:20
本文介绍了Azure 移动/Web 应用程序的 POST(从 Arduino 工作)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过发送 POST 来查找如何使用移动/网络应用程序的示例.
以前在移动服务中可以像这样发送 POST:

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}

但现在身份验证完全改变了.
现在怎么做,是否可以在某处找到 POST 样本?

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

只找到了 Table Service REST API 但它仍然存在我不清楚

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

推荐答案

您仍然可以使用下一个 URL 表示法来访问表:

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."}

因此对于 Web App Easy Table,您应该使用下一个 ZUMO-header,例如

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}

它有效.

这篇关于Azure 移动/Web 应用程序的 POST(从 Arduino 工作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆