我想通过Podio API将标签添加到Podio项目,但我正在努力正确地格式化json正文。
当我收到400的时候,我想我的请求是正确的,问题出在json格式中。请参阅下面的代码。
有什么建议吗?
为了确保,我使用Integromat进行API调用(Podio`s的“进行API调用”模块)
{
"response": {
"status": 400,
"headers": {
"date": "Tue, 16 Mar 2021 12:10:31 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "291",
"connection": "close",
"server": "nginx",
"x-rate-limit-remaining": "9990",
"x-rate-limit-limit": "10000",
"x-podio-auth-ref": "********",
"x-podio-request-id": "********"
},
"body": {
"error_parameters": {},
"error_detail": null,
"error_propagate": false,
"request": {
"url": "http://api.podio.com/tag/item/***********/",
"query_string": "",
"method": "POST"
},
"error_description": "Invalid value {\"{text}\": [\"test1\", \"test2\"]} (object): must be array",
"error": "invalid_value"
}
},
"request": {
"url": "https://api.podio.com/tag/item/***********/",/",
"headers": {
"Authorization": "***",
"User-Agent": "Integromat/production"
},
"method": "POST",
"body": {
"{text}": [
"test1",
"test2"
]
}
}
}发布于 2021-05-29 02:03:10
你的身体是错的。
如果你想创建带有"test1“和"test2”值的标签,你的主体应该是:
["foo","bar"]它应该是标记的JSON数组。
https://stackoverflow.com/questions/66657196
复制相似问题