我有一个与官方客户端配合良好的 Windows Azure 移动服务。但是,如果我可以从命令行脚本运行测试而无需编写和编译代码,那就更好了。
如何参数化 curl
或 wget
才能访问我的服务中的表和 API 脚本?
最佳答案
这个有一些curl 调用,有助于在我的演示移动服务应用程序上进行快速测试...
注意自定义 header “X-ZUMO-APPLICATION”以及您如何配置表的权限。最简单的一种是仅使用应用程序 key 。
Experimenting with Windows Azure Mobile Services
示例:
#read table
curl --header X-ZUMO-APPLICATION:{apptoken} https://{servicenamespace}.azure-mobile.net/tables/{tablename}
#invoke API script
curl --header X-ZUMO-APPLICATION:{apptoken} https://{servicenamespace}.azure-mobile.net/api/{scriptname}
关于mobile - 从命令行使用 Azure 移动服务进行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17080819/