Azure移动应用程序-未提供要插入的项目 [英] Azure Mobile Apps - An item to insert was not provided

查看:49
本文介绍了Azure移动应用程序-未提供要插入的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的nodeJS自定义Azure移动应用后端上创建一个新表.该表称为readings.js:

I am trying to create a new table on my nodeJS custom Azure Mobile App backend. The table is called readings.js:

var azureMobileApps = require("azure-mobile-apps");
var table = azureMobileApps.table();
table.columns = {
    "text": "string",
    "complete": "boolean"
};
module.exports = table;

app.js:

var express = require("express");
var azureMobileApps = require("azure-mobile-apps");
var app = express();

var mobileApp = azureMobileApps({
    homePage: true,
    swagger: true
});

mobileApp.tables.import("./tables");

mobileApp.tables.initialize()
    .then(function () {
    app.use(mobileApp); // Register the Azure Mobile Apps middleware
    app.listen(process.env.PORT || 3000); // Listen for requests
});

但是,这是我在POST到API时得到的回扣:

and yet, this is the reposnse I get when POST'ing to the API:

为什么会发生此错误?

推荐答案

似乎您正在本地环境上开发Azure移动应用程序.这是一个帖子.您可以参考详细信息.

It seems you are developing Azure Mobile Apps on local environment. Here is a post in the same scenario guiding you how to do. You can refer to detailed info.

关于您的问题,请通过POSTMAN发布数据,请尝试选择body选项卡中的raw单选按钮,然后选择JSON内容类型,然后直接在textare中写入json对象.

Regarding your issue, post data via POSTMAN, please try to select the raw radio button in body tab, and select the JSON content type, then directly write the json object in the textare.

任何进一步的担忧,请随时让我知道.

Any further concern, please feel free to let me know.

这篇关于Azure移动应用程序-未提供要插入的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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