原型] {}"/>
Express和nodeJS:[对象:空原型] {}
我有这个问题,当我在服务器中收到请求时,响应为:
[Object: null prototype] { '{"someParameter": "potatoParameterValue", "someOtherParameter": "otherPotatoParameter}': '' }
我已经使用过
api.use(bodyParser.urlencoded({ extended: false }));
api.use(bodyParser.json());
并且不起作用,其他人也遇到了同样的问题?
回答如下:让我尝试快速球,不妨提供更多信息。。
看来您可能在otherPotatoParameter之后缺少“。现在对象中的键是对象。。
{
'{"someParameter": "potatoParameterValue", "someOtherParameter": "otherPotatoParameter}': ''
}
也许应该是这样吗?
{
"someParameter": "potatoParameterValue",
"someOtherParameter": "otherPotatoParamete"
}
更多推荐
Express和nodeJS:[对象:空原型] {}
发布评论