135 lines
No EOL
3.3 KiB
JSON
135 lines
No EOL
3.3 KiB
JSON
[
|
|
{
|
|
"id": "69a64e3d.84da3",
|
|
"type": "http in",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "",
|
|
"url": "/hello-raw",
|
|
"method": "post",
|
|
"upload": false,
|
|
"swaggerDoc": "",
|
|
"x": 260,
|
|
"y": 1560,
|
|
"wires": [
|
|
[
|
|
"38d357a7.b69d08"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "43e49c36.dc7624",
|
|
"type": "http response",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "",
|
|
"statusCode": "",
|
|
"headers": {},
|
|
"x": 530,
|
|
"y": 1560,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "8cb4b74e.602c28",
|
|
"type": "comment",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "Post data to a flow",
|
|
"info": "The `HTTP In` node can listen for POST requests. It returns the posted data as `msg.payload`.\n\nSee Node-RED cookbook items(\n[post raw data(https://cookbook.nodered.org/http/post-raw-data-to-a-flow), [post form data](https://cookbook.nodered.org/http/post-form-data-to-a-flow), [post JSON data](https://cookbook.nodered.org/http/post-json-data-to-a-flow)\n) for details.",
|
|
"x": 210,
|
|
"y": 1520,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "ec661b6b.c3c2b8",
|
|
"type": "http request",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "",
|
|
"method": "POST",
|
|
"ret": "txt",
|
|
"paytoqs": "ignore",
|
|
"url": "http://localhost:1880/hello-raw",
|
|
"tls": "",
|
|
"persist": false,
|
|
"proxy": "",
|
|
"authType": "",
|
|
"x": 370,
|
|
"y": 1660,
|
|
"wires": [
|
|
[
|
|
"7c2812c.c6ee7ec"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "7c2812c.c6ee7ec",
|
|
"type": "debug",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 530,
|
|
"y": 1660,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "38d357a7.b69d08",
|
|
"type": "template",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "page",
|
|
"field": "payload",
|
|
"fieldType": "msg",
|
|
"format": "html",
|
|
"syntax": "mustache",
|
|
"template": "<html>\n <head></head>\n <body>\n <h1>Hello {{payload}}</h1>\n </body>\n</html>",
|
|
"output": "str",
|
|
"x": 410,
|
|
"y": 1560,
|
|
"wires": [
|
|
[
|
|
"43e49c36.dc7624"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "e45041b6.9ec13",
|
|
"type": "inject",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"payload": "Nick",
|
|
"payloadType": "str",
|
|
"x": 230,
|
|
"y": 1660,
|
|
"wires": [
|
|
[
|
|
"ec661b6b.c3c2b8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "af33dae7.b21138",
|
|
"type": "comment",
|
|
"z": "d41b4dd3.ecd6a",
|
|
"name": "Send HTTP POST request: http://localhost:1880/hello-raw",
|
|
"info": "",
|
|
"x": 330,
|
|
"y": 1620,
|
|
"wires": []
|
|
}
|
|
] |