我尝试使用 https://rpinotify.it/invio-di-testo.html 我想发送带有http帖子的消息,但我不能,查看图片
我将Node-Red用作fred.sensetecnic,我尝试使用json,字符串...我不能放弃,可以帮我吗?
3/7/2018, 08:43:15node: 9ee1f8ea.e1c5b8
msg.payload : Object
object
text: "testo"
3/7/2018, 08:43:15node: 9ee1f8ea.e1c5b8
msg.payload : Object
object
info: object
datetime: "2018-07-03 06:43:15"
ip: "54.149.86.44, 108.162.246.239"
message: "'text' or 'img' POST parameter are required"
response: 400
[
{
"id": "e6ce432b.5361",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "1b6aa9ad.127af6",
"type": "inject",
"z": "e6ce432b.5361",
"name": "",
"topic": "",
"payload": "{\"text\":\"testo\"}",
"payloadType": "json",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 420,
"wires": [
[
"18f17e07.1a0c42",
"9ee1f8ea.e1c5b8"
]
]
},
{
"id": "18f17e07.1a0c42",
"type": "http request",
"z": "e6ce432b.5361",
"name": "",
"method": "POST",
"ret": "obj",
"url": "https://api.rpinotify.it/message/xxx__secret_key__xxx/",
"tls": "",
"x": 370,
"y": 480,
"wires": [
[
"9ee1f8ea.e1c5b8"
]
]
},
{
"id": "9ee1f8ea.e1c5b8",
"type": "debug",
"z": "e6ce432b.5361",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 550,
"y": 380,
"wires": []
}
]
答案 0 :(得分:0)
如果您要发送{}
的msg.payload,这是一个空对象。
错误是说您需要在对象中具有text
或img
字段(具有合理的值)