@gregoriusrippenstein/erlang-red-unittest 0.21.7 → 0.21.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/examples/debug/handle largish json files as content.json +1 -1
  2. package/examples/exec/handle multiple process at once (ered).json +1 -1
  3. package/examples/exec/support timeout specification.json +1 -0
  4. package/examples/exec/synchronised execution.json +1 -0
  5. package/examples/file in/basic functionality of being able to read a file.json +1 -1
  6. package/examples/file in/will accept file name from msg obj.json +1 -1
  7. package/examples/http/Dynamic Routing.json +1 -1
  8. package/examples/http/POST & GET have different endpoints.json +1 -1
  9. package/examples/http/dynamic redirect.json +1 -1
  10. package/examples/http/have params in the path.json +1 -1
  11. package/examples/http/http static routing.json +1 -1
  12. package/examples/http/multiple endpoints don't all get the request.json +1 -1
  13. package/examples/http/nodes should be able to handle requests.json +1 -1
  14. package/examples/http/post requests - json content.json +1 -1
  15. package/examples/http/request parses JSON conent.json +1 -1
  16. package/examples/http/request, ensure url and method are handled.json +1 -1
  17. package/examples/http/set content type.json +1 -1
  18. package/examples/http/support query string on get request.json +1 -1
  19. package/examples/json/parse example json content.json +1 -1
  20. package/examples/split/work with binary data as string data.json +1 -0
  21. package/nodes/ut-assert-debug.js +43 -83
  22. package/nodes/ut-config.js +5 -2
  23. package/package.json +1 -1
  24. package/examples/exec/handle multiple process at once (nred).json +0 -1
  25. package/examples/exec/support timeout specification (ered).json +0 -1
  26. package/examples/exec/support timeout specification (nred).json +0 -1
  27. package/examples/exec/synchronised execution (ered).json +0 -1
  28. package/examples/exec/synchronised execution (nred).json +0 -1
  29. package/examples/split/work with binary data as string data (ered).json +0 -1
  30. package/examples/split/work with binary data as string data (nred).json +0 -1
@@ -1 +1 @@
1
- [{"id":"af57984ed3302e3e","type":"tab","label":"[debug] handle largish json files as content","disabled":false,"info":"something is going wrong.","env":[{"name":"ERED_ONLY","value":"false","type":"bool"}]},{"id":"eed6e232d1d7b941","type":"inject","z":"af57984ed3302e3e","name":"","props":[{"p":"filename","v":"${priv}/testdata/test.json","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":203,"y":311,"wires":[["f07ab922c0b0d713","334521bc24b21544"]]},{"id":"f07ab922c0b0d713","type":"file in","z":"af57984ed3302e3e","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":392,"y":420.5,"wires":[["a0f648ebec37e562","7718f360b8eb0106"]]},{"id":"a0f648ebec37e562","type":"debug","z":"af57984ed3302e3e","name":"debug 9 [af57984ed3302e3e]","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":520,"wires":[]},{"id":"334521bc24b21544","type":"debug","z":"af57984ed3302e3e","name":"debug 10 [af57984ed3302e3e]","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":311,"wires":[]},{"id":"7718f360b8eb0106","type":"ut-assert-success","z":"af57984ed3302e3e","name":"","count":1,"x":670,"y":420.5,"wires":[]}]
1
+ [{"id":"af57984ed3302e3e","type":"tab","label":"[debug] handle largish json files as content","disabled":false,"info":"something is going wrong.","env":[{"name":"ERED_ONLY","value":"false","type":"bool"}]},{"id":"14141e656ac68b7f","type":"junction","z":"af57984ed3302e3e","x":515,"y":336,"wires":[["334521bc24b21544","f07ab922c0b0d713"]]},{"id":"eed6e232d1d7b941","type":"inject","z":"af57984ed3302e3e","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":216,"y":149,"wires":[["26ee9bde65385574"]]},{"id":"f07ab922c0b0d713","type":"file in","z":"af57984ed3302e3e","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":691,"y":426.5,"wires":[["a0f648ebec37e562","7718f360b8eb0106"]]},{"id":"a0f648ebec37e562","type":"debug","z":"af57984ed3302e3e","name":"debug 9 [af57984ed3302e3e]","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1009,"y":526,"wires":[]},{"id":"334521bc24b21544","type":"debug","z":"af57984ed3302e3e","name":"debug 10 [af57984ed3302e3e]","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1009,"y":336,"wires":[]},{"id":"7718f360b8eb0106","type":"ut-assert-success","z":"af57984ed3302e3e","name":"","count":1,"x":969,"y":426.5,"wires":[]},{"id":"e89231c51ee7ea65","type":"change","z":"af57984ed3302e3e","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"$$.utcfg.priv & \"/testdata/test.json\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":418,"y":286,"wires":[["14141e656ac68b7f"]]},{"id":"26ee9bde65385574","type":"ut-config","z":"af57984ed3302e3e","name":"","x":325,"y":219,"wires":[["e89231c51ee7ea65"]]}]
@@ -1 +1 @@
1
- [{"id":"47514a335b4cd67e","type":"tab","label":"[exec] handle multiple process at once (ered)","disabled":false,"info":"this flow demonstrates the ability of the exec node to manage multiple running processes at one time.\n\nexternal processes of `sleep 1000` are started one after another and then are terminated by a separate kill message.\n\nNote: if the timeout is set on the exec node, it will also kill each process individually.","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_TIMEOUT","value":"15","type":"num"},{"name":"NRED_TIMEOUT","value":"15","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"e85bbe5329de235b","type":"exec","z":"47514a335b4cd67e","command":"sleep 1000","addpay":"","append":"","useSpawn":"true","timer":"","winHide":false,"oldrc":false,"name":"","x":674,"y":446,"wires":[[],[],["21e6d1d6b458f0d7"]]},{"id":"bf20bf7cb45143fb","type":"inject","z":"47514a335b4cd67e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":122,"y":152,"wires":[["e85bbe5329de235b","e62f1b9598c87031","fb986ae1a73e3f36","7db1e4f0398b4f23","58326eca1ab40f88","160ebe4acd0960ef","a88dcf477e938c6b"]]},{"id":"bf98365c60dbcd7b","type":"status","z":"47514a335b4cd67e","name":"","scope":["e85bbe5329de235b"],"x":676.0000610351562,"y":525.75,"wires":[["f0f77e64ce2c6c9b"]]},{"id":"14924cd18ebc1d21","type":"change","z":"47514a335b4cd67e","name":"","rules":[{"p":"pid","pt":"msg","t":"set","to":"$split($$.status.text, \":\")","tot":"jsonata"},{"p":"pid","pt":"msg","t":"set","to":"$$.pid[1]","tot":"jsonata"},{"p":"kill","pt":"msg","t":"set","to":"SIGTERM","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":298,"y":728,"wires":[["60f3aa384adc4efa"]]},{"id":"60f3aa384adc4efa","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":599,"wires":[["e85bbe5329de235b"]]},{"id":"e62f1b9598c87031","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":152,"wires":[["e85bbe5329de235b"]]},{"id":"fb986ae1a73e3f36","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":212.5,"wires":[["e85bbe5329de235b"]]},{"id":"7db1e4f0398b4f23","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":273,"wires":[["e85bbe5329de235b"]]},{"id":"58326eca1ab40f88","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":385,"wires":[["e85bbe5329de235b"]]},{"id":"160ebe4acd0960ef","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"6","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":446,"wires":[["e85bbe5329de235b"]]},{"id":"f0f77e64ce2c6c9b","type":"switch","z":"47514a335b4cd67e","name":"","property":"status.text","propertyType":"msg","rules":[{"t":"neq","v":"Killed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":839,"y":657,"wires":[["14924cd18ebc1d21","a29ef1babc809299"]]},{"id":"a88dcf477e938c6b","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":324,"wires":[["e85bbe5329de235b"]]},{"id":"a29ef1babc809299","type":"ut-assert-success","z":"47514a335b4cd67e","name":"","count":"7","x":1046,"y":657,"wires":[]},{"id":"21e6d1d6b458f0d7","type":"ut-assert-success","z":"47514a335b4cd67e","name":"","count":"7","x":1046,"y":459.75,"wires":[]}]
1
+ [{"id":"47514a335b4cd67e","type":"tab","label":"[exec] handle multiple process at once (ered)","disabled":false,"info":"this flow demonstrates the ability of the exec node to manage multiple running processes at one time.\n\nexternal processes of `sleep 1000` are started one after another and then are terminated by a separate kill message.\n\nNote: if the timeout is set on the exec node, it will also kill each process individually.","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_TIMEOUT","value":"15","type":"num"},{"name":"NRED_TIMEOUT","value":"15","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"4c475bfaa6215a6a","type":"group","z":"47514a335b4cd67e","name":"Erlang-Red Only","style":{"label":true},"nodes":["a29ef1babc809299"],"env":[{"name":"ERED_ONLY","value":"true","type":"bool"}],"x":1077,"y":551,"w":232,"h":82},{"id":"5a5281f672b13483","type":"group","z":"47514a335b4cd67e","name":"Node-RED Only","style":{"label":true},"nodes":["e30a81ac2ddedaee"],"env":[{"name":"NODE_RED_ONLY","value":"true","type":"bool"}],"x":1071,"y":660,"w":232,"h":82},{"id":"e85bbe5329de235b","type":"exec","z":"47514a335b4cd67e","command":"sleep 1000","addpay":"","append":"","useSpawn":"true","timer":"","winHide":false,"oldrc":false,"name":"","x":674,"y":446,"wires":[[],[],["21e6d1d6b458f0d7"]]},{"id":"bf20bf7cb45143fb","type":"inject","z":"47514a335b4cd67e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":122,"y":152,"wires":[["e85bbe5329de235b","e62f1b9598c87031","fb986ae1a73e3f36","7db1e4f0398b4f23","58326eca1ab40f88","160ebe4acd0960ef","a88dcf477e938c6b"]]},{"id":"bf98365c60dbcd7b","type":"status","z":"47514a335b4cd67e","name":"","scope":["e85bbe5329de235b"],"x":676.0000610351562,"y":525.75,"wires":[["f0f77e64ce2c6c9b"]]},{"id":"14924cd18ebc1d21","type":"change","z":"47514a335b4cd67e","name":"","rules":[{"t":"set","p":"pid","pt":"msg","to":"$split($$.status.text, \":\")","tot":"jsonata"},{"t":"set","p":"pid","pt":"msg","to":"$$.pid[1]","tot":"jsonata"},{"t":"set","p":"kill","pt":"msg","to":"SIGTERM","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":298,"y":728,"wires":[["60f3aa384adc4efa"]]},{"id":"60f3aa384adc4efa","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":599,"wires":[["e85bbe5329de235b"]]},{"id":"e62f1b9598c87031","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":152,"wires":[["e85bbe5329de235b"]]},{"id":"fb986ae1a73e3f36","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":212.5,"wires":[["e85bbe5329de235b"]]},{"id":"7db1e4f0398b4f23","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":488,"y":273,"wires":[["e85bbe5329de235b"]]},{"id":"58326eca1ab40f88","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":385,"wires":[["e85bbe5329de235b"]]},{"id":"160ebe4acd0960ef","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"6","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":446,"wires":[["e85bbe5329de235b"]]},{"id":"f0f77e64ce2c6c9b","type":"switch","z":"47514a335b4cd67e","name":"","property":"status.text","propertyType":"msg","rules":[{"t":"neq","v":"Killed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":839,"y":657,"wires":[["14924cd18ebc1d21","a29ef1babc809299","e30a81ac2ddedaee"]]},{"id":"a88dcf477e938c6b","type":"delay","z":"47514a335b4cd67e","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":310,"y":324,"wires":[["e85bbe5329de235b"]]},{"id":"a29ef1babc809299","type":"ut-assert-success","z":"47514a335b4cd67e","g":"4c475bfaa6215a6a","name":"","count":"7","x":1193,"y":592,"wires":[]},{"id":"21e6d1d6b458f0d7","type":"ut-assert-success","z":"47514a335b4cd67e","name":"","count":"7","x":1046,"y":459.75,"wires":[]},{"id":"e30a81ac2ddedaee","type":"ut-assert-success","z":"47514a335b4cd67e","g":"5a5281f672b13483","name":"","msglimit":">=","count":"7","x":1187,"y":701,"wires":[]}]
@@ -0,0 +1 @@
1
+ [{"id":"9746601768c3b3b6","type":"tab","label":"[exec] support timeout specification","disabled":false,"info":"the timeout on an exec node be used to stop daemon from running longer than a test case.\n\nIf the message isn't sent by the time the test case is killed, then the test case fails.","env":[{"name":"ERED_TIMEOUT","value":"7","type":"num"},{"name":"NRED_TIMEOUT","value":"7","type":"num"}]},{"id":"33ae365950735ba4","type":"group","z":"9746601768c3b3b6","name":"Erlang-Red Only","style":{"label":true},"nodes":["0f7ce66536de607a"],"env":[{"name":"ERED_ONLY","value":"true","type":"bool"}],"x":874.888916015625,"y":554.3333740234375,"w":312,"h":82},{"id":"0c2e074e924eb233","type":"group","z":"9746601768c3b3b6","name":"Node-RED Only","style":{"label":true},"nodes":["fe8b6e1740151e99"],"env":[{"name":"NODE_RED_ONLY","value":"true","type":"bool"}],"x":946,"y":323,"w":272,"h":82},{"id":"e5752543f573c690","type":"inject","z":"9746601768c3b3b6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":179,"y":284,"wires":[["bc45ad0c3084eab2"]]},{"id":"bc45ad0c3084eab2","type":"exec","z":"9746601768c3b3b6","command":"sleep 30","addpay":"","append":"","useSpawn":"true","timer":"5","winHide":false,"oldrc":false,"name":"sleep 30 with a timeout of 5 seconds","x":559,"y":455,"wires":[[],[],["0f7ce66536de607a","fe8b6e1740151e99"]]},{"id":"0f7ce66536de607a","type":"ut-assert-values","z":"9746601768c3b3b6","g":"33ae365950735ba4","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"15","tot":"num"}],"x":1030.888916015625,"y":595.3333740234375,"wires":[[]]},{"id":"fe8b6e1740151e99","type":"ut-assert-values","z":"9746601768c3b3b6","g":"0c2e074e924eb233","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.signal","pt":"msg","t":"eql","to":"SIGTERM","tot":"str"}],"x":1082,"y":364,"wires":[[]]}]
@@ -0,0 +1 @@
1
+ [{"id":"c0b1cf6656eac77f","type":"tab","label":"[exec] synchronised execution","disabled":false,"info":"","env":[{"name":"ERED_TIMEOUT","value":"6","type":"num"},{"name":"NRED_TIMEOUT","value":"6","type":"num"}]},{"id":"2b4d9ee88eff618b","type":"group","z":"c0b1cf6656eac77f","name":"timeout that triggers after command completion","style":{"label":true},"nodes":["2f9029a33f3688a8","34ecd7044cb107c0","8a49eb330319b071","8e975e9b613ad34b","e59e3353ab52eb1a"],"x":146.75,"y":1221,"w":991.25,"h":194},{"id":"b0a28454b231f29c","type":"group","z":"c0b1cf6656eac77f","name":"no time out normal completion","style":{"label":true},"nodes":["34584b1493b966d1","394f2a8574bcae04","1f7e2413bdf97ba6","0eb5e6fe3bbe4a54","8a95a8bbe8ec1711"],"x":154.75,"y":987,"w":889.25,"h":201},{"id":"fb93cca833bb943c","type":"group","z":"c0b1cf6656eac77f","name":"time out kills process, but message queue is flooded","style":{"label":true},"nodes":["3d0fc6b73f545bf1","c149f1afcce104c0","6b2197ef37baacf9","1071c9eb5be5f316","f9cfb10ee86075e7","1b3e7714d6147438"],"x":530.75,"y":546,"w":1311.25,"h":415.88885498046875},{"id":"af09a3c02e5dc779","type":"group","z":"c0b1cf6656eac77f","name":"timout but no flooding of message queue","style":{"label":true},"nodes":["3e608f637baf6d92","6ac13f394822cbdb","2e6aeadb4ff3c225","2f4a6dfb5c0f1297","093282d88e228e6a"],"x":287,"y":111.67019653320312,"w":1220,"h":401.3298034667969},{"id":"1b3e7714d6147438","type":"group","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"Node-RED Only","style":{"label":true},"nodes":["94163796258cd3e7","296e7f8318265466"],"env":[{"name":"NODE_RED_ONLY","value":"true","type":"bool"}],"x":1440,"y":620.9580373764038,"w":272,"h":129.0419626235962},{"id":"f9cfb10ee86075e7","type":"group","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"Erlang-Red Only","style":{"label":true},"nodes":["fdd9833ca1fa4e19","e0eb63220a075c77"],"env":[{"name":"ERED_ONLY","value":"true","type":"bool"}],"x":1498.77783203125,"y":788,"w":317.22216796875,"h":147.88885498046875},{"id":"093282d88e228e6a","type":"group","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"Node-RED Only","style":{"label":true},"nodes":["dfe2fea48d14dc5b","87c71015a53ee2ad"],"env":[{"name":"NODE_RED_ONLY","value":"true","type":"bool"}],"x":1187,"y":137.67019653320312,"w":272,"h":149.32980346679688},{"id":"2f4a6dfb5c0f1297","type":"group","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"Erlang-Red Only","style":{"label":true},"nodes":["4a8c801fc0aeda71","d7bce7594d752e58"],"env":[{"name":"ERED_ONLY","value":"true","type":"bool"}],"x":1169,"y":307.7777910232544,"w":312,"h":179.2222089767456},{"id":"3e608f637baf6d92","type":"exec","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","command":"echo dasdasd ; sleep 10","addpay":"","append":"","useSpawn":"false","timer":"4","winHide":false,"oldrc":false,"name":"","x":618.25,"y":313,"wires":[["2e6aeadb4ff3c225"],["4a8c801fc0aeda71","87c71015a53ee2ad"],["d7bce7594d752e58","dfe2fea48d14dc5b"]]},{"id":"6ac13f394822cbdb","type":"inject","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":393,"y":314,"wires":[["3e608f637baf6d92"]]},{"id":"3d0fc6b73f545bf1","type":"exec","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","command":"yes hello","addpay":"","append":"","useSpawn":"false","timer":"2","winHide":false,"oldrc":false,"name":"","x":826,"y":670.5,"wires":[["6b2197ef37baacf9"],["e0eb63220a075c77","296e7f8318265466"],["fdd9833ca1fa4e19","94163796258cd3e7"]]},{"id":"c149f1afcce104c0","type":"inject","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":636.75,"y":653.5,"wires":[["3d0fc6b73f545bf1"]]},{"id":"34584b1493b966d1","type":"exec","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","command":"echo \"Stdout\" ; echo \"stderr\" >&2 ; echo \"done\"","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":418,"y":1133,"wires":[["1f7e2413bdf97ba6"],["8a95a8bbe8ec1711"],["0eb5e6fe3bbe4a54"]]},{"id":"394f2a8574bcae04","type":"inject","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260.75,"y":1041,"wires":[["34584b1493b966d1"]]},{"id":"2f9029a33f3688a8","type":"exec","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","command":"echo \"timeout\" ; echo \"fires later\" >&2 ; echo \"done\"","addpay":"","append":"","useSpawn":"false","timer":"3","winHide":false,"oldrc":false,"name":"","x":511,"y":1361,"wires":[["8e975e9b613ad34b"],["e59e3353ab52eb1a"],["8a49eb330319b071"]]},{"id":"34ecd7044cb107c0","type":"inject","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":252.75,"y":1298,"wires":[["2f9029a33f3688a8"]]},{"id":"6b2197ef37baacf9","type":"switch","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","property":"$length($$.payload)","propertyType":"jsonata","rules":[{"t":"gt","v":"1000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1020,"y":623,"wires":[["1071c9eb5be5f316"]]},{"id":"1071c9eb5be5f316","type":"ut-assert-success","z":"c0b1cf6656eac77f","g":"fb93cca833bb943c","name":"","count":1,"x":1203,"y":587,"wires":[]},{"id":"2e6aeadb4ff3c225","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"af09a3c02e5dc779","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"dasdasd\\n","tot":"str"}],"x":943,"y":175,"wires":[[]]},{"id":"4a8c801fc0aeda71","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2f4a6dfb5c0f1297","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"","tot":"str"}],"x":1319.2221603393555,"y":348.7777910232544,"wires":[[]]},{"id":"d7bce7594d752e58","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2f4a6dfb5c0f1297","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"15","tot":"num"}],"x":1325,"y":446,"wires":[[]]},{"id":"1f7e2413bdf97ba6","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"Stdout\\ndone\\n","tot":"str"}],"x":794,"y":1028,"wires":[[]]},{"id":"0eb5e6fe3bbe4a54","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"0","tot":"num"}],"x":898,"y":1147,"wires":[[]]},{"id":"8a49eb330319b071","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"0","tot":"num"}],"x":992,"y":1374,"wires":[[]]},{"id":"8a95a8bbe8ec1711","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"b0a28454b231f29c","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"stderr\\n","tot":"str"}],"x":836,"y":1087.5,"wires":[[]]},{"id":"8e975e9b613ad34b","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"timeout\\ndone\\n","tot":"str"}],"x":884.5,"y":1262,"wires":[[]]},{"id":"e59e3353ab52eb1a","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"2b4d9ee88eff618b","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"eql","to":"fires later\\n","tot":"str"}],"x":928.25,"y":1318,"wires":[[]]},{"id":"fdd9833ca1fa4e19","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"f9cfb10ee86075e7","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload.code","pt":"msg","t":"eql","to":"15","tot":"num"}],"x":1654.77783203125,"y":894.8888549804688,"wires":[[]]},{"id":"e0eb63220a075c77","type":"ut-assert-success","z":"c0b1cf6656eac77f","g":"f9cfb10ee86075e7","name":"","msglimit":"==","count":1,"x":1700,"y":829,"wires":[]},{"id":"94163796258cd3e7","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"1b3e7714d6147438","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.code","pt":"msg","to":"ERR_CHILD_PROCESS_STDIO_MAXBUFFER","tot":"str"}],"x":1576,"y":709,"wires":[[]]},{"id":"296e7f8318265466","type":"ut-assert-failure","z":"c0b1cf6656eac77f","g":"1b3e7714d6147438","name":"","x":1598.689437866211,"y":661.9580373764038,"wires":[]},{"id":"dfe2fea48d14dc5b","type":"ut-assert-values","z":"c0b1cf6656eac77f","g":"093282d88e228e6a","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload.signal","pt":"msg","to":"SIGTERM","tot":"str"}],"x":1323,"y":246,"wires":[[]]},{"id":"87c71015a53ee2ad","type":"ut-assert-failure","z":"c0b1cf6656eac77f","g":"093282d88e228e6a","name":"","x":1302.1422233581543,"y":178.67019653320312,"wires":[]}]
@@ -1 +1 @@
1
- [{"id":"538be5947c639b32","type":"tab","label":"[file in] basic functionality of being able to read a file","disabled":false,"info":"Read the contents of a file into the msg object setting the payload attribute.","env":[{"name":"ERED_ONLY","value":"false","type":"bool"}]},{"id":"9d31c507908f85b7","type":"inject","z":"538be5947c639b32","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":191,"y":387,"wires":[["d057038e3093d5ae"]]},{"id":"d057038e3093d5ae","type":"file in","z":"538be5947c639b32","name":"","filename":"${priv}/testdata/helloworld.txt","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":427,"y":468,"wires":[["24f5da2bf8e77acc"]]},{"id":"24f5da2bf8e77acc","type":"ut-assert-values","z":"538be5947c639b32","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"mth","p":"payload","pt":"msg","to":"hello world","tot":"str"}],"x":721,"y":402,"wires":[[]]}]
1
+ [{"id":"538be5947c639b32","type":"tab","label":"[file in] basic functionality of being able to read a file","disabled":false,"info":"Read the contents of a file into the msg object setting the payload attribute."},{"id":"9d31c507908f85b7","type":"inject","z":"538be5947c639b32","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":163,"y":322,"wires":[["7d2afca2a81f01ce"]]},{"id":"d057038e3093d5ae","type":"file in","z":"538be5947c639b32","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":430,"y":524,"wires":[["24f5da2bf8e77acc"]]},{"id":"24f5da2bf8e77acc","type":"ut-assert-values","z":"538be5947c639b32","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"payload","pt":"msg","t":"mth","to":"hello world","tot":"str"}],"x":825,"y":524,"wires":[[]]},{"id":"7d2afca2a81f01ce","type":"ut-config","z":"538be5947c639b32","name":"","x":252,"y":389,"wires":[["c31232096b34f432"]]},{"id":"c31232096b34f432","type":"change","z":"538be5947c639b32","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"$$.utcfg.priv & \"/testdata/helloworld.txt\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":362,"y":457,"wires":[["d057038e3093d5ae"]]}]
@@ -1 +1 @@
1
- [{"id":"9e7ccc97f80d9afb","type":"tab","label":"[file in] will accept file name from msg obj","disabled":false,"info":"A file name can also be dynamic and be taken from the msg object passed to the file in node.","env":[{"name":"ERED_ONLY","value":"false","type":"bool"}]},{"id":"3de9bd2926669640","type":"inject","z":"9e7ccc97f80d9afb","name":"","props":[{"p":"filename","v":"${priv}/testdata/helloworld.txt","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":145.1428985595703,"y":147.14284896850586,"wires":[["e89d0c894d08b485"]]},{"id":"e89d0c894d08b485","type":"file in","z":"9e7ccc97f80d9afb","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":342.1428985595703,"y":245.64284896850586,"wires":[["e0f13216032f1fe6","05c8dee92f3f6768"]]},{"id":"e0f13216032f1fe6","type":"ut-assert-values","z":"9e7ccc97f80d9afb","name":"","rules":[{"p":"payload","pt":"msg","t":"mth","to":"hello world","tot":"str"}],"x":594.1428985595703,"y":143.14284896850586,"wires":[[]]},{"id":"2b511c22a8ddb371","type":"ut-assert-debug","z":"9e7ccc97f80d9afb","name":"","scope":["e89d0c894d08b485"],"nodeid":"e89d0c894d08b485","msgtype":"normal","inverse":true,"x":274.1428985595703,"y":299.64284896850586,"wires":[["2fefb063b9b40a19"]]},{"id":"05c8dee92f3f6768","type":"ut-assert-success","z":"9e7ccc97f80d9afb","name":"","count":1,"x":636,"y":245.64284896850586,"wires":[]},{"id":"2fefb063b9b40a19","type":"ut-assert-failure","z":"9e7ccc97f80d9afb","name":"","x":636,"y":299.64284896850586,"wires":[]}]
1
+ [{"id":"9e7ccc97f80d9afb","type":"tab","label":"[file in] will accept file name from msg obj","disabled":false,"info":"A file name can also be dynamic and be taken from the msg object passed to the file in node.","env":[{"name":"ERED_ONLY","type":"bool","value":"false"}]},{"id":"3de9bd2926669640","type":"inject","z":"9e7ccc97f80d9afb","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":182.14288330078125,"y":115.14285278320312,"wires":[["6031cb8bf9e444bd"]]},{"id":"e89d0c894d08b485","type":"file in","z":"9e7ccc97f80d9afb","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":495.1428985595703,"y":315.6428527832031,"wires":[["e0f13216032f1fe6","05c8dee92f3f6768"]]},{"id":"e0f13216032f1fe6","type":"ut-assert-values","z":"9e7ccc97f80d9afb","name":"","rules":[{"p":"payload","pt":"msg","t":"mth","to":"hello world","tot":"str"}],"x":747.1428985595703,"y":213.14285278320312,"wires":[[]]},{"id":"2b511c22a8ddb371","type":"ut-assert-debug","z":"9e7ccc97f80d9afb","name":"","scope":["e89d0c894d08b485"],"nodeid":"e89d0c894d08b485","msgtype":"normal","inverse":true,"x":427.1428985595703,"y":369.6428527832031,"wires":[["2fefb063b9b40a19"]]},{"id":"05c8dee92f3f6768","type":"ut-assert-success","z":"9e7ccc97f80d9afb","name":"","count":1,"x":789,"y":315.6428527832031,"wires":[]},{"id":"2fefb063b9b40a19","type":"ut-assert-failure","z":"9e7ccc97f80d9afb","name":"","x":789,"y":369.6428527832031,"wires":[]},{"id":"6031cb8bf9e444bd","type":"ut-config","z":"9e7ccc97f80d9afb","name":"","x":274,"y":197,"wires":[["b1feb5f83dee201b"]]},{"id":"b1feb5f83dee201b","type":"change","z":"9e7ccc97f80d9afb","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"$$.utcfg.priv & \"/testdata/helloworld.txt\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":402,"y":255,"wires":[["e89d0c894d08b485"]]}]
@@ -1 +1 @@
1
- [{"id":"c562c43e69bcf0af","type":"tab","label":"[http] Dynamic Routing","disabled":false,"info":"This is taken from [FlowHub.org](https://flowhub.org/f/c562c43e69bcf0af).\n\n### aim\n\nUsing link-in and link-call nodes to implementing dynamic path routing. \n\n### warning\n\nThis flow contains Http-In endpoinst definitions that could interrupt existing endpoints and services or open your Node-RED installation to malicious attacks.\n\n\n### Explanation\n\nThis router, as opposed to the [static router](https://flowhub.org/f/40ea5f2aea6592ae), accepts all requests and directs the request to a handler *if* a handler happens to be defined. The dynamic router disects that path and *ensures* that a handler is defined for that path.\n\nIn this flow defining a new handler for a path is a matter of creating a link-in node. The <a class=\"ahl-node-only\" data-ids=\"63311a5c3e0b8520\">http-in</a> node accepts all GET requests that match the path specification `/<path1>/<path2>`: path1 and path2 can be anything that represents a path.\n\nRouting is based on the names of the link-in nodes, in this case the convention used is that a link-in node should be named `[:path1] :path2`. This convention is defined in the <a class=\"ahl-node-only\" data-ids=\"5117e34e38f7445f\">change node</a> that sets the `msg.target` attribute. This attribute is used by the <a class=\"ahl-node-only\" data-ids=\"f266975e312ddef6\">link-call</a> node, which calls the correponding link-in node.\n\nIf no link-in node is found by that name, the <a class=\"ahl-group-only\" data-ids=\"627be3679370b933\">exception handler</a> is triggered that ends the request with a Http Code 404 - page not found.\n\nA link-in node, once defined, is responsible for generate the HTML content for the request. A <a class=\"ahl-node-only\" data-ids=\"a78e640e4d0dad43,dafcc80764d7547d\">link-out node</a> in *return mode* (meaning the call returns to the original link-call node) ends the flow ensuring the HTML content is returned to the link-call node. The link-call node then returns the HTML content as response to the original request.\n\nIf the link-out node is missing or the handler takes too long (the link-call node has a timeout of 15 seconds) the exception handler is triggered. The response becomes a 404 not found.\n\nThis kind of routing is useful for blog sites where content is generated over time and maintaining a static router would be an extra step for each page. Instead link-in nodes are created at will and become connected to the site.\n\nA <a href=\"https://flowhub.org/f/40ea5f2aea6592ae\">static router</a> is more useful for APIs where endpoints need to be clearly defined along with their purpose. Also with API its more important to differentiate between http methods, that is, GET, POST, PUT, PATCH.\n\nFor an API it is advantageous to have an overview of the complete structure defined in one flow tab. \n\nIn this flow has two endpoints:\n\n- `/hello/world` since <a class=\"ahl-node-only\" data-ids=\"6eafc7df3d7fa16c\">link-in node</a> is named `[hello] world`.\n- `/node/red` since <a class=\"ahl-node-only\" data-ids=\"4be3e088622e9054\">link-in node</a> is named `[node] red`.\n\nThe name convention is chosen by the author, there is no requirement to keep it. There simple needs to be a mapping between the paths of requests and the naming of link-in nodes, whatever mapping that might be.\n\n### Related Flows\n\n- [Static Router](https://flowhub.org/f/40ea5f2aea6592ae) routing paths to *specific* endpoints.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"6","type":"num"},{"name":"ERED_PENDING","value":"false","type":"bool"}]},{"id":"627be3679370b933","type":"group","z":"c562c43e69bcf0af","name":"Route not found","style":{"label":true},"nodes":["e47df6c462833421","cc0c614b1e1e6104","8d7b5b2ee31e3e96"],"x":764,"y":755,"w":801,"h":82},{"id":"207fa856ae4a3b07","type":"group","z":"c562c43e69bcf0af","name":"router","style":{"label":true},"nodes":["63311a5c3e0b8520","f266975e312ddef6","5117e34e38f7445f","df4ccd20486f7567","a6b3f178d410ef1f"],"x":246,"y":582,"w":1319,"h":130},{"id":"8bae3ca1893c2c87","type":"group","z":"c562c43e69bcf0af","name":"GET /hello/world","style":{"label":true},"nodes":["6eafc7df3d7fa16c","8022ad08a9ca1c78","a78e640e4d0dad43"],"x":239,"y":352,"w":455,"h":82},{"id":"fabeb20aa2bae1f8","type":"group","z":"c562c43e69bcf0af","name":"GET /node/red","style":{"label":true},"nodes":["4be3e088622e9054","e7110ab46bd47bad","dafcc80764d7547d"],"x":239,"y":491,"w":455,"h":82},{"id":"ef8a88e4ca600a52","type":"group","z":"c562c43e69bcf0af","name":"GET /erlang/red","style":{"label":true},"nodes":["88bee951ca1d55b6","0e76b7678533cde6","d3d2fcad3090e646"],"x":240,"y":228,"w":455,"h":82},{"id":"63311a5c3e0b8520","type":"http in","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"","url":"/c562c43e69bcf0af/example02/:path1/:path2","method":"get","upload":false,"swaggerDoc":"","x":462,"y":623,"wires":[["5117e34e38f7445f"]]},{"id":"f266975e312ddef6","type":"link call","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"","links":[],"linkType":"dynamic","timeout":"15","x":962,"y":671,"wires":[["a6b3f178d410ef1f"]]},{"id":"5117e34e38f7445f","type":"change","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"set msg.target \"[:path1] :path2\"","rules":[{"t":"set","p":"target","pt":"msg","to":"\"[\" & msg.req.params.path1 & \"] \" & msg.req.params.path2","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":713.5,"y":671,"wires":[["f266975e312ddef6"]]},{"id":"e47df6c462833421","type":"catch","z":"c562c43e69bcf0af","g":"627be3679370b933","name":"","scope":["f266975e312ddef6"],"uncaught":false,"x":840,"y":796,"wires":[["8d7b5b2ee31e3e96"]]},{"id":"cc0c614b1e1e6104","type":"http response","z":"c562c43e69bcf0af","g":"627be3679370b933","name":"resp (404)","statusCode":"","headers":{},"x":1479,"y":796,"wires":[]},{"id":"8d7b5b2ee31e3e96","type":"change","z":"c562c43e69bcf0af","g":"627be3679370b933","name":"statusCode = 404, payload = Not Found","rules":[{"p":"payload","pt":"msg","t":"set","to":"Not Found Here","tot":"str"},{"p":"statusCode","pt":"msg","t":"set","to":"404","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1181,"y":796,"wires":[["cc0c614b1e1e6104"]]},{"id":"df4ccd20486f7567","type":"http response","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"resp (200)","statusCode":"","headers":{},"x":1479,"y":671,"wires":[]},{"id":"a6b3f178d410ef1f","type":"change","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"set statusCode = 200","rules":[{"p":"statusCode","pt":"msg","t":"set","to":"200","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220.5,"y":671,"wires":[["df4ccd20486f7567"]]},{"id":"6eafc7df3d7fa16c","type":"link in","z":"c562c43e69bcf0af","g":"8bae3ca1893c2c87","name":"[hello] world","links":[],"x":280,"y":393,"wires":[["8022ad08a9ca1c78"]]},{"id":"8022ad08a9ca1c78","type":"template","z":"c562c43e69bcf0af","g":"8bae3ca1893c2c87","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <title>Hello World</title>\n </head>\n <body>\n Hello World\n </body>\n</html>","output":"str","x":466.5,"y":393,"wires":[["a78e640e4d0dad43"]]},{"id":"a78e640e4d0dad43","type":"link out","z":"c562c43e69bcf0af","g":"8bae3ca1893c2c87","name":"link out 110","mode":"return","links":[],"x":653,"y":393,"wires":[]},{"id":"4be3e088622e9054","type":"link in","z":"c562c43e69bcf0af","g":"fabeb20aa2bae1f8","name":"[node] red","links":[],"x":280,"y":532,"wires":[["e7110ab46bd47bad"]]},{"id":"e7110ab46bd47bad","type":"template","z":"c562c43e69bcf0af","g":"fabeb20aa2bae1f8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <title>Node RED</title>\n </head>\n <body>\n Node-RED\n </body>\n</html>","output":"str","x":466.5,"y":532,"wires":[["dafcc80764d7547d"]]},{"id":"dafcc80764d7547d","type":"link out","z":"c562c43e69bcf0af","g":"fabeb20aa2bae1f8","name":"link out 111","mode":"return","links":[],"x":653,"y":532,"wires":[]},{"id":"88bee951ca1d55b6","type":"link in","z":"c562c43e69bcf0af","g":"ef8a88e4ca600a52","name":"[erlang] red","links":[],"x":281,"y":269,"wires":[["0e76b7678533cde6"]]},{"id":"0e76b7678533cde6","type":"template","z":"c562c43e69bcf0af","g":"ef8a88e4ca600a52","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <title>Erlang RED</title>\n </head>\n <body>\n Erlang-RED\n </body>\n</html>","output":"str","x":467.5,"y":269,"wires":[["d3d2fcad3090e646"]]},{"id":"d3d2fcad3090e646","type":"link out","z":"c562c43e69bcf0af","g":"ef8a88e4ca600a52","name":"link out 1","mode":"return","links":[],"x":654,"y":269,"wires":[]},{"id":"5ef99a8f388e3579","type":"inject","z":"c562c43e69bcf0af","name":"test starts here","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":343,"y":997,"wires":[["0d18c87ae65b4697"]]},{"id":"89d3370d9127c78d","type":"http request","z":"c562c43e69bcf0af","name":"/erlang/red","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/c562c43e69bcf0af/example02/erlang/red","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":654,"y":1118,"wires":[["4945c17057fb3588","9a715cf1a06dce43"]]},{"id":"74b7789f10ff8395","type":"http request","z":"c562c43e69bcf0af","name":"/page/unknown","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/c562c43e69bcf0af/example02/page/unknown","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":663,"y":1207,"wires":[["2b3aa74e2cb36b3a","8782c1802f1ebf38"]]},{"id":"e8063bc6f5121b66","type":"http request","z":"c562c43e69bcf0af","name":"/node/red","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/c562c43e69bcf0af/example02/node/red","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":647,"y":1035.5,"wires":[["190218dd2197c204","f23e0e07c9aa32b3"]]},{"id":"2b3aa74e2cb36b3a","type":"ut-assert-values","z":"c562c43e69bcf0af","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"statusCode","pt":"msg","to":"404","tot":"num"},{"t":"mth","p":"payload","pt":"msg","to":"Not Found Here","tot":"str"}],"x":907,"y":1165.5,"wires":[[]]},{"id":"190218dd2197c204","type":"ut-assert-values","z":"c562c43e69bcf0af","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"statusCode","pt":"msg","to":"200","tot":"num"},{"t":"mth","p":"payload","pt":"msg","to":"Node RED","tot":"str"}],"x":907,"y":980,"wires":[[]]},{"id":"4945c17057fb3588","type":"ut-assert-values","z":"c562c43e69bcf0af","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"statusCode","pt":"msg","to":"200","tot":"num"},{"t":"mth","p":"payload","pt":"msg","to":"Erlang RED","tot":"str"}],"x":907,"y":1072.75,"wires":[[]]},{"id":"0d18c87ae65b4697","type":"delay","z":"c562c43e69bcf0af","name":"","pauseType":"random","timeout":"950","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"500","randomUnits":"milliseconds","drop":false,"allowrate":false,"outputs":1,"x":390,"y":1092,"wires":[["89d3370d9127c78d","e8063bc6f5121b66","74b7789f10ff8395"]]},{"id":"f23e0e07c9aa32b3","type":"ut-assert-success","z":"c562c43e69bcf0af","name":"","count":1,"x":1123,"y":1035.5,"wires":[]},{"id":"9a715cf1a06dce43","type":"ut-assert-success","z":"c562c43e69bcf0af","name":"","count":1,"x":1123,"y":1118,"wires":[]},{"id":"8782c1802f1ebf38","type":"ut-assert-success","z":"c562c43e69bcf0af","name":"","count":1,"x":1123,"y":1207,"wires":[]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"c562c43e69bcf0af","type":"tab","label":"[http] Dynamic Routing","disabled":false,"info":"This is taken from [FlowHub.org](https://flowhub.org/f/c562c43e69bcf0af).\n\n### aim\n\nUsing link-in and link-call nodes to implementing dynamic path routing. \n\n### warning\n\nThis flow contains Http-In endpoinst definitions that could interrupt existing endpoints and services or open your Node-RED installation to malicious attacks.\n\n\n### Explanation\n\nThis router, as opposed to the [static router](https://flowhub.org/f/40ea5f2aea6592ae), accepts all requests and directs the request to a handler *if* a handler happens to be defined. The dynamic router disects that path and *ensures* that a handler is defined for that path.\n\nIn this flow defining a new handler for a path is a matter of creating a link-in node. The <a class=\"ahl-node-only\" data-ids=\"63311a5c3e0b8520\">http-in</a> node accepts all GET requests that match the path specification `/<path1>/<path2>`: path1 and path2 can be anything that represents a path.\n\nRouting is based on the names of the link-in nodes, in this case the convention used is that a link-in node should be named `[:path1] :path2`. This convention is defined in the <a class=\"ahl-node-only\" data-ids=\"5117e34e38f7445f\">change node</a> that sets the `msg.target` attribute. This attribute is used by the <a class=\"ahl-node-only\" data-ids=\"f266975e312ddef6\">link-call</a> node, which calls the correponding link-in node.\n\nIf no link-in node is found by that name, the <a class=\"ahl-group-only\" data-ids=\"627be3679370b933\">exception handler</a> is triggered that ends the request with a Http Code 404 - page not found.\n\nA link-in node, once defined, is responsible for generate the HTML content for the request. A <a class=\"ahl-node-only\" data-ids=\"a78e640e4d0dad43,dafcc80764d7547d\">link-out node</a> in *return mode* (meaning the call returns to the original link-call node) ends the flow ensuring the HTML content is returned to the link-call node. The link-call node then returns the HTML content as response to the original request.\n\nIf the link-out node is missing or the handler takes too long (the link-call node has a timeout of 15 seconds) the exception handler is triggered. The response becomes a 404 not found.\n\nThis kind of routing is useful for blog sites where content is generated over time and maintaining a static router would be an extra step for each page. Instead link-in nodes are created at will and become connected to the site.\n\nA <a href=\"https://flowhub.org/f/40ea5f2aea6592ae\">static router</a> is more useful for APIs where endpoints need to be clearly defined along with their purpose. Also with API its more important to differentiate between http methods, that is, GET, POST, PUT, PATCH.\n\nFor an API it is advantageous to have an overview of the complete structure defined in one flow tab. \n\nIn this flow has two endpoints:\n\n- `/hello/world` since <a class=\"ahl-node-only\" data-ids=\"6eafc7df3d7fa16c\">link-in node</a> is named `[hello] world`.\n- `/node/red` since <a class=\"ahl-node-only\" data-ids=\"4be3e088622e9054\">link-in node</a> is named `[node] red`.\n\nThe name convention is chosen by the author, there is no requirement to keep it. There simple needs to be a mapping between the paths of requests and the naming of link-in nodes, whatever mapping that might be.\n\n### Related Flows\n\n- [Static Router](https://flowhub.org/f/40ea5f2aea6592ae) routing paths to *specific* endpoints.","env":[{"name":"ERED_NOT_EUNIT","type":"bool","value":"true"},{"name":"ERED_TIMEOUT","type":"num","value":"6"},{"name":"ERED_PENDING","type":"bool","value":"false"}]},{"id":"627be3679370b933","type":"group","z":"c562c43e69bcf0af","name":"Route not found","style":{"label":true},"nodes":["e47df6c462833421","cc0c614b1e1e6104","8d7b5b2ee31e3e96"],"x":764,"y":755,"w":801,"h":82},{"id":"207fa856ae4a3b07","type":"group","z":"c562c43e69bcf0af","name":"router","style":{"label":true},"nodes":["63311a5c3e0b8520","f266975e312ddef6","5117e34e38f7445f","df4ccd20486f7567","a6b3f178d410ef1f"],"x":246,"y":582,"w":1319,"h":130},{"id":"8bae3ca1893c2c87","type":"group","z":"c562c43e69bcf0af","name":"GET /hello/world","style":{"label":true},"nodes":["6eafc7df3d7fa16c","8022ad08a9ca1c78","a78e640e4d0dad43"],"x":239,"y":352,"w":455,"h":82},{"id":"fabeb20aa2bae1f8","type":"group","z":"c562c43e69bcf0af","name":"GET /node/red","style":{"label":true},"nodes":["4be3e088622e9054","e7110ab46bd47bad","dafcc80764d7547d"],"x":239,"y":491,"w":455,"h":82},{"id":"ef8a88e4ca600a52","type":"group","z":"c562c43e69bcf0af","name":"GET /erlang/red","style":{"label":true},"nodes":["88bee951ca1d55b6","0e76b7678533cde6","d3d2fcad3090e646"],"x":240,"y":228,"w":455,"h":82},{"id":"549382091922b950","type":"junction","z":"c562c43e69bcf0af","x":638,"y":1131,"wires":[["1c32d9ef8e6cf486","25ddafd5f0dca249","a4842c64c55b9f47"]]},{"id":"63311a5c3e0b8520","type":"http in","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"","url":"/c562c43e69bcf0af/example02/:path1/:path2","method":"get","upload":false,"swaggerDoc":"","x":462,"y":623,"wires":[["5117e34e38f7445f"]]},{"id":"f266975e312ddef6","type":"link call","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"","links":[],"linkType":"dynamic","timeout":"15","x":962,"y":671,"wires":[["a6b3f178d410ef1f"]]},{"id":"5117e34e38f7445f","type":"change","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"set msg.target \"[:path1] :path2\"","rules":[{"t":"set","p":"target","pt":"msg","to":"\"[\" & msg.req.params.path1 & \"] \" & msg.req.params.path2","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":713.5,"y":671,"wires":[["f266975e312ddef6"]]},{"id":"e47df6c462833421","type":"catch","z":"c562c43e69bcf0af","g":"627be3679370b933","name":"","scope":["f266975e312ddef6"],"uncaught":false,"x":840,"y":796,"wires":[["8d7b5b2ee31e3e96"]]},{"id":"cc0c614b1e1e6104","type":"http response","z":"c562c43e69bcf0af","g":"627be3679370b933","name":"resp (404)","statusCode":"","headers":{},"x":1479,"y":796,"wires":[]},{"id":"8d7b5b2ee31e3e96","type":"change","z":"c562c43e69bcf0af","g":"627be3679370b933","name":"statusCode = 404, payload = Not Found","rules":[{"p":"payload","pt":"msg","t":"set","to":"Not Found Here","tot":"str"},{"p":"statusCode","pt":"msg","t":"set","to":"404","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1181,"y":796,"wires":[["cc0c614b1e1e6104"]]},{"id":"df4ccd20486f7567","type":"http response","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"resp (200)","statusCode":"","headers":{},"x":1479,"y":671,"wires":[]},{"id":"a6b3f178d410ef1f","type":"change","z":"c562c43e69bcf0af","g":"207fa856ae4a3b07","name":"set statusCode = 200","rules":[{"p":"statusCode","pt":"msg","t":"set","to":"200","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220.5,"y":671,"wires":[["df4ccd20486f7567"]]},{"id":"6eafc7df3d7fa16c","type":"link in","z":"c562c43e69bcf0af","g":"8bae3ca1893c2c87","name":"[hello] world","links":[],"x":280,"y":393,"wires":[["8022ad08a9ca1c78"]]},{"id":"8022ad08a9ca1c78","type":"template","z":"c562c43e69bcf0af","g":"8bae3ca1893c2c87","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <title>Hello World</title>\n </head>\n <body>\n Hello World\n </body>\n</html>","output":"str","x":466.5,"y":393,"wires":[["a78e640e4d0dad43"]]},{"id":"a78e640e4d0dad43","type":"link out","z":"c562c43e69bcf0af","g":"8bae3ca1893c2c87","name":"link out 110","mode":"return","links":[],"x":653,"y":393,"wires":[]},{"id":"4be3e088622e9054","type":"link in","z":"c562c43e69bcf0af","g":"fabeb20aa2bae1f8","name":"[node] red","links":[],"x":280,"y":532,"wires":[["e7110ab46bd47bad"]]},{"id":"e7110ab46bd47bad","type":"template","z":"c562c43e69bcf0af","g":"fabeb20aa2bae1f8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <title>Node RED</title>\n </head>\n <body>\n Node-RED\n </body>\n</html>","output":"str","x":466.5,"y":532,"wires":[["dafcc80764d7547d"]]},{"id":"dafcc80764d7547d","type":"link out","z":"c562c43e69bcf0af","g":"fabeb20aa2bae1f8","name":"link out 111","mode":"return","links":[],"x":653,"y":532,"wires":[]},{"id":"88bee951ca1d55b6","type":"link in","z":"c562c43e69bcf0af","g":"ef8a88e4ca600a52","name":"[erlang] red","links":[],"x":281,"y":269,"wires":[["0e76b7678533cde6"]]},{"id":"0e76b7678533cde6","type":"template","z":"c562c43e69bcf0af","g":"ef8a88e4ca600a52","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <title>Erlang RED</title>\n </head>\n <body>\n Erlang-RED\n </body>\n</html>","output":"str","x":467.5,"y":269,"wires":[["d3d2fcad3090e646"]]},{"id":"d3d2fcad3090e646","type":"link out","z":"c562c43e69bcf0af","g":"ef8a88e4ca600a52","name":"link out 1","mode":"return","links":[],"x":654,"y":269,"wires":[]},{"id":"5ef99a8f388e3579","type":"inject","z":"c562c43e69bcf0af","name":"test starts here","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":269,"y":1007,"wires":[["fc1b264c0b4d4ce3"]]},{"id":"89d3370d9127c78d","type":"http request","z":"c562c43e69bcf0af","name":"/erlang/red","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"92325780b1d609a4","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1067,"y":1123,"wires":[["4945c17057fb3588","9a715cf1a06dce43"]]},{"id":"74b7789f10ff8395","type":"http request","z":"c562c43e69bcf0af","name":"/page/unknown","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"92325780b1d609a4","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1076,"y":1206,"wires":[["2b3aa74e2cb36b3a","8782c1802f1ebf38"]]},{"id":"e8063bc6f5121b66","type":"http request","z":"c562c43e69bcf0af","name":"/node/red","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"92325780b1d609a4","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1060,"y":1036.25,"wires":[["190218dd2197c204","f23e0e07c9aa32b3"]]},{"id":"2b3aa74e2cb36b3a","type":"ut-assert-values","z":"c562c43e69bcf0af","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"404","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"Not Found Here","tot":"str"}],"x":1320,"y":1167.5,"wires":[[]]},{"id":"190218dd2197c204","type":"ut-assert-values","z":"c562c43e69bcf0af","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"Node RED","tot":"str"}],"x":1320,"y":982,"wires":[[]]},{"id":"4945c17057fb3588","type":"ut-assert-values","z":"c562c43e69bcf0af","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"Erlang RED","tot":"str"}],"x":1320,"y":1074.75,"wires":[[]]},{"id":"f23e0e07c9aa32b3","type":"ut-assert-success","z":"c562c43e69bcf0af","name":"","count":1,"x":1536,"y":1036.25,"wires":[]},{"id":"9a715cf1a06dce43","type":"ut-assert-success","z":"c562c43e69bcf0af","name":"","count":1,"x":1536,"y":1123,"wires":[]},{"id":"8782c1802f1ebf38","type":"ut-assert-success","z":"c562c43e69bcf0af","name":"","count":1,"x":1536,"y":1206,"wires":[]},{"id":"fc1b264c0b4d4ce3","type":"ut-config","z":"c562c43e69bcf0af","name":"","x":495,"y":1089,"wires":[["549382091922b950"]]},{"id":"1c32d9ef8e6cf486","type":"change","z":"c562c43e69bcf0af","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/c562c43e69bcf0af/example02/node/red\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":794,"y":1036.25,"wires":[["e8063bc6f5121b66"]]},{"id":"25ddafd5f0dca249","type":"change","z":"c562c43e69bcf0af","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/c562c43e69bcf0af/example02/erlang/red\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":794,"y":1123,"wires":[["89d3370d9127c78d"]]},{"id":"a4842c64c55b9f47","type":"change","z":"c562c43e69bcf0af","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/c562c43e69bcf0af/example02/page/unknown\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":794,"y":1206,"wires":[["74b7789f10ff8395"]]},{"id":"92325780b1d609a4","type":"tls-config","name":"c562c43e69bcf0af-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
@@ -1 +1 @@
1
- [{"id":"44f12f6e4a455084","type":"tab","label":"[http] POST & GET have different endpoints","disabled":false,"info":"Defining two endpoints for the same path but that differ by method should be supported.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"5","type":"num"}]},{"id":"1ee4966eef5be3c7","type":"http in","z":"44f12f6e4a455084","name":"","url":"/44f12f6e4a455084/example07/data","method":"get","upload":false,"swaggerDoc":"","x":477,"y":507,"wires":[["c1cfaca2395882ca","905f4a96866d216a","2fb697c68342967d"]]},{"id":"8b46873434c47c64","type":"http in","z":"44f12f6e4a455084","name":"","url":"/44f12f6e4a455084/example07/data","method":"post","upload":false,"swaggerDoc":"","x":472,"y":234.5,"wires":[["0660a9b61b2d2625","c1cfaca2395882ca","3f58a97eadc4d74a"]]},{"id":"0660a9b61b2d2625","type":"ut-assert-values","z":"44f12f6e4a455084","name":"","rules":[{"t":"eql","p":"payload","pt":"msg","to":"world","tot":"str"}],"x":1106,"y":96,"wires":[[]]},{"id":"2fb697c68342967d","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1086,"y":511.5,"wires":[]},{"id":"3f58a97eadc4d74a","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1086,"y":234.5,"wires":[]},{"id":"480f4d85fc71d2b2","type":"http request","z":"44f12f6e4a455084","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/44f12f6e4a455084/example07/data?p=world&p2=ddd","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":736,"y":843,"wires":[["8c7c8608c19cf1d0"]]},{"id":"d05bf163282c5908","type":"inject","z":"44f12f6e4a455084","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":102,"y":845,"wires":[["a4a6034b312d4597","c6a6f43aca748f8b"]]},{"id":"59a9432dc3b29d21","type":"http request","z":"44f12f6e4a455084","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"${host}/44f12f6e4a455084/example07/data","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":738,"y":902,"wires":[["09b5fc4621688fed"]]},{"id":"a4a6034b312d4597","type":"change","z":"44f12f6e4a455084","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"hello","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":547,"y":843,"wires":[["480f4d85fc71d2b2"]]},{"id":"c6a6f43aca748f8b","type":"change","z":"44f12f6e4a455084","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"world","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":902,"wires":[["59a9432dc3b29d21"]]},{"id":"c1cfaca2395882ca","type":"http response","z":"44f12f6e4a455084","name":"","statusCode":"200","headers":{},"x":1076,"y":373,"wires":[]},{"id":"905f4a96866d216a","type":"ut-assert-values","z":"44f12f6e4a455084","name":"","rules":[{"p":"req.query.p","pt":"msg","t":"eql","to":"world","tot":"str"}],"x":1116,"y":650,"wires":[[]]},{"id":"8c7c8608c19cf1d0","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1023,"y":800.5,"wires":[]},{"id":"09b5fc4621688fed","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1030,"y":858.5,"wires":[]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"44f12f6e4a455084","type":"tab","label":"[http] POST & GET have different endpoints","disabled":false,"info":"Defining two endpoints for the same path but that differ by method should be supported.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"5","type":"num"}]},{"id":"e8acdae0603dbf1a","type":"junction","z":"44f12f6e4a455084","x":300,"y":858,"wires":[["a4a6034b312d4597","c6a6f43aca748f8b"]]},{"id":"1ee4966eef5be3c7","type":"http in","z":"44f12f6e4a455084","name":"","url":"/44f12f6e4a455084/example07/data","method":"get","upload":false,"swaggerDoc":"","x":477,"y":507,"wires":[["c1cfaca2395882ca","905f4a96866d216a","2fb697c68342967d"]]},{"id":"8b46873434c47c64","type":"http in","z":"44f12f6e4a455084","name":"","url":"/44f12f6e4a455084/example07/data","method":"post","upload":false,"swaggerDoc":"","x":472,"y":234.5,"wires":[["0660a9b61b2d2625","c1cfaca2395882ca","3f58a97eadc4d74a"]]},{"id":"0660a9b61b2d2625","type":"ut-assert-values","z":"44f12f6e4a455084","name":"","rules":[{"t":"eql","p":"payload","pt":"msg","to":"world","tot":"str"}],"x":1106,"y":96,"wires":[[]]},{"id":"2fb697c68342967d","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1086,"y":511.5,"wires":[]},{"id":"3f58a97eadc4d74a","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1086,"y":234.5,"wires":[]},{"id":"480f4d85fc71d2b2","type":"http request","z":"44f12f6e4a455084","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"05fc39de31863793","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":736,"y":843,"wires":[["8c7c8608c19cf1d0"]]},{"id":"d05bf163282c5908","type":"inject","z":"44f12f6e4a455084","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":137,"y":675,"wires":[["e8449a139a394869"]]},{"id":"59a9432dc3b29d21","type":"http request","z":"44f12f6e4a455084","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"05fc39de31863793","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":738,"y":902,"wires":[["09b5fc4621688fed"]]},{"id":"a4a6034b312d4597","type":"change","z":"44f12f6e4a455084","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"hello","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/44f12f6e4a455084/example07/data?p=world&p2=ddd\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":506,"y":840,"wires":[["480f4d85fc71d2b2"]]},{"id":"c6a6f43aca748f8b","type":"change","z":"44f12f6e4a455084","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"world","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/44f12f6e4a455084/example07/data\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":509,"y":899,"wires":[["59a9432dc3b29d21"]]},{"id":"c1cfaca2395882ca","type":"http response","z":"44f12f6e4a455084","name":"","statusCode":"200","headers":{},"x":1076,"y":373,"wires":[]},{"id":"905f4a96866d216a","type":"ut-assert-values","z":"44f12f6e4a455084","name":"","rules":[{"p":"req.query.p","pt":"msg","t":"eql","to":"world","tot":"str"}],"x":1116,"y":650,"wires":[[]]},{"id":"8c7c8608c19cf1d0","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1023,"y":800.5,"wires":[]},{"id":"09b5fc4621688fed","type":"ut-assert-success","z":"44f12f6e4a455084","name":"","count":1,"x":1030,"y":858.5,"wires":[]},{"id":"e8449a139a394869","type":"ut-config","z":"44f12f6e4a455084","name":"","x":161,"y":723,"wires":[["e8acdae0603dbf1a"]]},{"id":"05fc39de31863793","type":"tls-config","name":"44f12f6e4a455084-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
@@ -1 +1 @@
1
- [{"id":"eed68dbcecd1431f","type":"tab","label":"[http] dynamic redirect","disabled":false,"info":"## HTTP redirect\n\nDynamic redirect overwriting the header settings of the node.\n\nTesting the dynamic setting of the Location header.","env":[{"name":"ERED_NOT_EUNIT","type":"bool","value":"true"},{"name":"ERED_TIMEOUT","type":"num","value":"5"}]},{"id":"5b426d51dcf3c2f8","type":"http response","z":"eed68dbcecd1431f","name":"redirect to https","statusCode":"301","headers":{},"x":834.857177734375,"y":461.14288330078125,"wires":[]},{"id":"c6d401a2115666f6","type":"change","z":"eed68dbcecd1431f","name":"","rules":[{"t":"set","p":"statusCode","pt":"msg","to":"301","tot":"num"},{"t":"set","p":"hostname","pt":"msg","to":"utcfg.host","tot":"msg"},{"t":"set","p":"_loc","pt":"msg","to":"$$.hostname & \"/teed68dbcecd1431f/redirected\"","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"\"<a href='\" & $$._loc & \"'>Redirect</a>\\n\"","tot":"jsonata"},{"t":"set","p":"headers","pt":"msg","to":"{ \"Location\": $$._loc }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":699.4285888671875,"y":372.28570556640625,"wires":[["5b426d51dcf3c2f8"]]},{"id":"2f671b7422d502d9","type":"http in","z":"eed68dbcecd1431f","name":"","url":"/teed68dbcecd1431f/example12/fubar","method":"get","upload":false,"skipBodyParsing":false,"swaggerDoc":"","x":438.857177734375,"y":237.64286041259766,"wires":[["56d2224b5822edc1"]]},{"id":"e3748318a95178e9","type":"inject","z":"eed68dbcecd1431f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250.0000228881836,"y":546.8214645385742,"wires":[["dda324dd7f114c3d"]]},{"id":"455ca5e77834096a","type":"http request","z":"eed68dbcecd1431f","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/teed68dbcecd1431f/example12/fubar","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":711.5237757364908,"y":546.8214645385742,"wires":[["ee737a9e34a1d3a2"]]},{"id":"dda324dd7f114c3d","type":"delay","z":"eed68dbcecd1431f","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":475.7618993123372,"y":546.8214645385742,"wires":[["455ca5e77834096a"]]},{"id":"624fa5de5352cb90","type":"ut-assert-values","z":"eed68dbcecd1431f","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"statusCode","pt":"msg","to":"200","tot":"num"},{"t":"eql","p":"responseUrl","pt":"msg","to":"$$.hostname & \"/teed68dbcecd1431f/redirected\"","tot":"jsonata"}],"x":1447.2856521606445,"y":606.8214645385742,"wires":[[]]},{"id":"f6b14e1666d62ba8","type":"change","z":"eed68dbcecd1431f","name":"","rules":[{"t":"set","p":"hostname","pt":"msg","to":"utcfg.host","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1206,"y":607,"wires":[["624fa5de5352cb90"]]},{"id":"0ec557f03f0cecef","type":"http in","z":"eed68dbcecd1431f","name":"","url":"/teed68dbcecd1431f/redirected","method":"get","upload":false,"skipBodyParsing":false,"swaggerDoc":"","x":954.9999694824219,"y":237.64286041259766,"wires":[["30746844a862b851"]]},{"id":"30746844a862b851","type":"http response","z":"eed68dbcecd1431f","name":"","statusCode":"","headers":{},"x":1224,"y":331,"wires":[]},{"id":"56d2224b5822edc1","type":"ut-config","z":"eed68dbcecd1431f","name":"","x":603,"y":303,"wires":[["c6d401a2115666f6"]]},{"id":"ee737a9e34a1d3a2","type":"ut-config","z":"eed68dbcecd1431f","name":"","x":970,"y":580,"wires":[["f6b14e1666d62ba8"]]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"eed68dbcecd1431f","type":"tab","label":"[http] dynamic redirect","disabled":false,"info":"## HTTP redirect\n\nDynamic redirect overwriting the header settings of the node.\n\nTesting the dynamic setting of the Location header.","env":[{"name":"ERED_NOT_EUNIT","type":"bool","value":"true"},{"name":"ERED_TIMEOUT","type":"num","value":"5"}]},{"id":"5b426d51dcf3c2f8","type":"http response","z":"eed68dbcecd1431f","name":"redirect to https","statusCode":"301","headers":{},"x":834.857177734375,"y":461.14288330078125,"wires":[]},{"id":"c6d401a2115666f6","type":"change","z":"eed68dbcecd1431f","name":"","rules":[{"t":"set","p":"statusCode","pt":"msg","to":"301","tot":"num"},{"t":"set","p":"hostname","pt":"msg","to":"utcfg.host","tot":"msg"},{"t":"set","p":"_loc","pt":"msg","to":"$$.hostname & \"/teed68dbcecd1431f/redirected\"","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"\"<a href='\" & $$._loc & \"'>Redirect</a>\\n\"","tot":"jsonata"},{"t":"set","p":"headers","pt":"msg","to":"{ \"Location\": $$._loc }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":699.4285888671875,"y":372.28570556640625,"wires":[["5b426d51dcf3c2f8"]]},{"id":"2f671b7422d502d9","type":"http in","z":"eed68dbcecd1431f","name":"","url":"/teed68dbcecd1431f/example12/fubar","method":"get","upload":false,"skipBodyParsing":false,"swaggerDoc":"","x":438.857177734375,"y":237.64286041259766,"wires":[["56d2224b5822edc1"]]},{"id":"e3748318a95178e9","type":"inject","z":"eed68dbcecd1431f","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":178.00000762939453,"y":584.4107055664062,"wires":[["dda324dd7f114c3d"]]},{"id":"455ca5e77834096a","type":"http request","z":"eed68dbcecd1431f","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"d052d31b299fba41","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1042.8570938110352,"y":584.4107055664062,"wires":[["f6b14e1666d62ba8"]]},{"id":"624fa5de5352cb90","type":"ut-assert-values","z":"eed68dbcecd1431f","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"statusCode","pt":"msg","to":"200","tot":"num"},{"t":"eql","p":"responseUrl","pt":"msg","to":"$$.hostname & \"/teed68dbcecd1431f/redirected\"","tot":"jsonata"}],"x":1525.2856369018555,"y":584.4107055664062,"wires":[[]]},{"id":"f6b14e1666d62ba8","type":"change","z":"eed68dbcecd1431f","name":"","rules":[{"t":"set","p":"hostname","pt":"msg","to":"utcfg.host","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1279.0713653564453,"y":584.4107055664062,"wires":[["624fa5de5352cb90"]]},{"id":"0ec557f03f0cecef","type":"http in","z":"eed68dbcecd1431f","name":"","url":"/teed68dbcecd1431f/redirected","method":"get","upload":false,"skipBodyParsing":false,"swaggerDoc":"","x":954.9999694824219,"y":237.64286041259766,"wires":[["30746844a862b851"]]},{"id":"30746844a862b851","type":"http response","z":"eed68dbcecd1431f","name":"","statusCode":"","headers":{},"x":1224,"y":331,"wires":[]},{"id":"56d2224b5822edc1","type":"ut-config","z":"eed68dbcecd1431f","name":"","x":603,"y":303,"wires":[["c6d401a2115666f6"]]},{"id":"dda324dd7f114c3d","type":"delay","z":"eed68dbcecd1431f","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":374.2142791748047,"y":584.4107055664062,"wires":[["0c5487af0b466cfd"]]},{"id":"0c5487af0b466cfd","type":"ut-config","z":"eed68dbcecd1431f","name":"","x":600.4285507202148,"y":584.4107055664062,"wires":[["ab75724da9cee72a"]]},{"id":"ab75724da9cee72a","type":"change","z":"eed68dbcecd1431f","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/teed68dbcecd1431f/example12/fubar\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":826.642822265625,"y":584.4107055664062,"wires":[["455ca5e77834096a"]]},{"id":"d052d31b299fba41","type":"tls-config","name":"eed68dbcecd1431f-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
@@ -1 +1 @@
1
- [{"id":"64445798b59d2630","type":"tab","label":"[http] have params in the path","disabled":false,"info":"Http in nodes should be able to define paths that contain placeholder for parameters.","env":[{"name":"ERED_NOT_EUNIT","type":"bool","value":"true"},{"name":"ERED_TIMEOUT","type":"num","value":"5"}]},{"id":"636e832e3c16a9e6","type":"http in","z":"64445798b59d2630","name":"","url":"/t64445798b59d2630/testtwo/:param1/:param2","method":"get","upload":false,"swaggerDoc":"","x":208,"y":530,"wires":[["7288f0fd22652e25","58de6c031b4d0618","2b0918bcb0b55c53","c2a29d7fc0ebe85e","2ca24d1ddbfe2454"]]},{"id":"568af6bcb1c5cf73","type":"http response","z":"64445798b59d2630","name":"","statusCode":"","headers":{},"x":743,"y":852,"wires":[]},{"id":"a7e3dcf48b15929a","type":"inject","z":"64445798b59d2630","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":222.5,"y":200,"wires":[["4311564baa38d4f0"]]},{"id":"7288f0fd22652e25","type":"template","z":"64445798b59d2630","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Hello world.\n\nAnd one more thing.\n\nThis is a test.\n\nBut should work.\n\n","output":"str","x":511,"y":744,"wires":[["568af6bcb1c5cf73"]]},{"id":"2ed1a71543381782","type":"http request","z":"64445798b59d2630","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/t64445798b59d2630/testtwo/val1/val2?query1=val3&query1=val4","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":589.5,"y":213,"wires":[["ebafe26f5b73eff6"]]},{"id":"4311564baa38d4f0","type":"delay","z":"64445798b59d2630","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":410,"y":260,"wires":[["2ed1a71543381782"]]},{"id":"ebafe26f5b73eff6","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"eql","to":"\"Hello world.\\n\\nAnd one more thing.\\n\\nThis is a test.\\n\\nBut should work.\\n\\n\"","tot":"json"}],"x":845.5,"y":213.5,"wires":[[]]},{"id":"58de6c031b4d0618","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"req.params.param1","pt":"msg","t":"eql","to":"val1","tot":"str"}],"x":613,"y":638,"wires":[[]]},{"id":"2b0918bcb0b55c53","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"req.params.param2","pt":"msg","t":"eql","to":"val2","tot":"str"}],"x":661,"y":579,"wires":[[]]},{"id":"c2a29d7fc0ebe85e","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"req.query","pt":"msg","t":"set"}],"x":734,"y":471,"wires":[[]]},{"id":"2ca24d1ddbfe2454","type":"ut-assert-values","z":"64445798b59d2630","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"req.query.query1","pt":"msg","to":"[\"val3\",\"val4\"]","tot":"json"}],"x":715,"y":530,"wires":[[]]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"64445798b59d2630","type":"tab","label":"[http] have params in the path","disabled":false,"info":"Http in nodes should be able to define paths that contain placeholder for parameters.","env":[{"name":"ERED_NOT_EUNIT","type":"bool","value":"true"},{"name":"ERED_TIMEOUT","type":"num","value":"5"}]},{"id":"636e832e3c16a9e6","type":"http in","z":"64445798b59d2630","name":"","url":"/t64445798b59d2630/testtwo/:param1/:param2","method":"get","upload":false,"swaggerDoc":"","x":208,"y":530,"wires":[["7288f0fd22652e25","58de6c031b4d0618","2b0918bcb0b55c53","c2a29d7fc0ebe85e","2ca24d1ddbfe2454"]]},{"id":"568af6bcb1c5cf73","type":"http response","z":"64445798b59d2630","name":"","statusCode":"","headers":{},"x":743,"y":852,"wires":[]},{"id":"a7e3dcf48b15929a","type":"inject","z":"64445798b59d2630","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":222.5,"y":200,"wires":[["4311564baa38d4f0"]]},{"id":"7288f0fd22652e25","type":"template","z":"64445798b59d2630","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Hello world.\n\nAnd one more thing.\n\nThis is a test.\n\nBut should work.\n\n","output":"str","x":511,"y":744,"wires":[["568af6bcb1c5cf73"]]},{"id":"2ed1a71543381782","type":"http request","z":"64445798b59d2630","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"337c218c3631b3a7","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":846.5,"y":218,"wires":[["ebafe26f5b73eff6"]]},{"id":"4311564baa38d4f0","type":"delay","z":"64445798b59d2630","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":410,"y":260,"wires":[["5abbf208bb08ee32"]]},{"id":"ebafe26f5b73eff6","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"eql","to":"\"Hello world.\\n\\nAnd one more thing.\\n\\nThis is a test.\\n\\nBut should work.\\n\\n\"","tot":"json"}],"x":1102.5,"y":218.5,"wires":[[]]},{"id":"58de6c031b4d0618","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"req.params.param1","pt":"msg","t":"eql","to":"val1","tot":"str"}],"x":613,"y":638,"wires":[[]]},{"id":"2b0918bcb0b55c53","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"req.params.param2","pt":"msg","t":"eql","to":"val2","tot":"str"}],"x":661,"y":579,"wires":[[]]},{"id":"c2a29d7fc0ebe85e","type":"ut-assert-values","z":"64445798b59d2630","name":"","rules":[{"p":"req.query","pt":"msg","t":"set"}],"x":734,"y":471,"wires":[[]]},{"id":"2ca24d1ddbfe2454","type":"ut-assert-values","z":"64445798b59d2630","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"req.query.query1","pt":"msg","to":"[\"val3\",\"val4\"]","tot":"json"}],"x":715,"y":530,"wires":[[]]},{"id":"c524d9d55e097804","type":"change","z":"64445798b59d2630","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/t64445798b59d2630/testtwo/val1/val2?query1=val3&query1=val4\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":688,"y":122,"wires":[["2ed1a71543381782"]]},{"id":"5abbf208bb08ee32","type":"ut-config","z":"64445798b59d2630","name":"","x":561,"y":180,"wires":[["c524d9d55e097804"]]},{"id":"337c218c3631b3a7","type":"tls-config","name":"64445798b59d2630-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
@@ -1 +1 @@
1
- [{"id":"f346d45c81f595e5","type":"tab","label":"[http] http static routing","disabled":false,"info":"Simple example of how to do http routing visuallying in the flow editor.\n\nThis can be started in Erlang-RED by deploying to the server and then can be accessed by another browser.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_TIMEOUT","value":"4","type":"num"},{"name":"NRED_TIMEOUT","value":"5","type":"num"}]},{"id":"abfa2c020b95ae9e","type":"http in","z":"f346d45c81f595e5","name":"","url":"/tf346d45c81f595e5/example01/:page","method":"get","upload":false,"swaggerDoc":"","x":319,"y":581,"wires":[["6fc97c857a69a1be"]]},{"id":"6fc97c857a69a1be","type":"switch","z":"f346d45c81f595e5","name":"","property":"req.params.page","propertyType":"msg","rules":[{"t":"eq","v":"page1","vt":"str"},{"t":"eq","v":"page2","vt":"str"},{"t":"eq","v":"page3","vt":"str"},{"t":"eq","v":"image.svg","vt":"str"},{"t":"eq","v":"flow.json","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":6,"x":637.6666412353516,"y":580.9999771118164,"wires":[["83b4ccd0b619f244"],["a89f0c5387dccd4e"],["39cf074fa2bfaf2a"],["3476bc4af55f68a1"],["518f379024ec6e32"],["3d8825286adab940"]]},{"id":"83b4ccd0b619f244","type":"template","z":"f346d45c81f595e5","name":"page1 content","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<p>\nThis is page number one, routed to you by Erlang-RED <i>the visual flow based programming tool</i> powered by Node-RED flow editor.\n</p>\n\n<a href=\"/example01/page2\">Next Page</a>\n\n<br>\n","output":"str","x":909.6666412353516,"y":466.2499771118164,"wires":[["77688de786ca2329"]]},{"id":"77688de786ca2329","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"","headers":{"content-type":"text/html"},"x":1403.6666412353516,"y":466.2499771118164,"wires":[]},{"id":"43901891b8b31e0b","type":"inject","z":"f346d45c81f595e5","name":"test starts here","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":382.6666450500488,"y":208.99997234344482,"wires":[["d0794bae04b5a721"]]},{"id":"0455e52d6481298a","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/tf346d45c81f595e5/example01/page1","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":770.6666450500488,"y":204.99997234344482,"wires":[["052939ee49dc884f"]]},{"id":"3d8825286adab940","type":"template","z":"f346d45c81f595e5","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<b>Page Not Found</b>\n","output":"str","x":889.6666412353516,"y":717.2499771118164,"wires":[["2b0fadc5c3583f16"]]},{"id":"2b0fadc5c3583f16","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"404","headers":{"content-type":"text/html"},"x":1403.6666412353516,"y":717.2499771118164,"wires":[]},{"id":"fb940a9af3e05b41","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/tf346d45c81f595e5/example01/unknown","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":770.6666450500488,"y":263.9999723434448,"wires":[["5cb9be50d953ec61"]]},{"id":"e5324341bc9a0a54","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/tf346d45c81f595e5/example01/page2","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":772.6666450500488,"y":142.99997234344482,"wires":[["1be51f04e59403bc"]]},{"id":"a89f0c5387dccd4e","type":"template","z":"f346d45c81f595e5","name":"page2 content","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<p>\nPage two is far more interesting since it contains an image.\n</p>\n\n<img src=\"/example01/image.svg\"/>\n\n<P>\n <a href=\"/example01/page3\">Page three</a> contains a missling page to check the 404 errors are also available.\n</p>","output":"str","x":909.6666412353516,"y":520.2499771118164,"wires":[["918ac7df0c29647d"]]},{"id":"918ac7df0c29647d","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"","headers":{"content-type":"text/html"},"x":1403.6666412353516,"y":520.2499771118164,"wires":[]},{"id":"518f379024ec6e32","type":"file in","z":"f346d45c81f595e5","name":"","filename":"${priv}/testflows//flow.f346d45c81f595e5.json","filenameType":"str","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":1009.6666412353516,"y":664.2499771118164,"wires":[["ef94e7d30f2abf0a"]]},{"id":"ef94e7d30f2abf0a","type":"http response","z":"f346d45c81f595e5","name":"json response","statusCode":"","headers":{"content-type":"application/json"},"x":1393.6666412353516,"y":664.2499771118164,"wires":[]},{"id":"3476bc4af55f68a1","type":"template","z":"f346d45c81f595e5","name":"image.svg","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg\n id=\"screenshot\"\n viewBox=\"0 0 750 213\"\n width=\"750\"\n height=\"213\"\n version=\"1.1\"\n style=\"-webkit-print-color-adjust: exact;\"\n sodipodi:docname=\"cut-uposh_hr.svg\"\n inkscape:version=\"1.2 (dc2aeda, 2022-05-15)\"\n xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:svg=\"http://www.w3.org/2000/svg\">\n <defs\n id=\"defs58754\" />\n <sodipodi:namedview\n id=\"namedview58752\"\n pagecolor=\"#ffffff\"\n bordercolor=\"#000000\"\n borderopacity=\"0.25\"\n inkscape:showpageshadow=\"2\"\n inkscape:pageopacity=\"0.0\"\n inkscape:pagecheckerboard=\"0\"\n inkscape:deskcolor=\"#d1d1d1\"\n showgrid=\"false\"\n inkscape:zoom=\"3.1338441\"\n inkscape:cx=\"417.21922\"\n inkscape:cy=\"87.432555\"\n inkscape:window-width=\"1573\"\n inkscape:window-height=\"484\"\n inkscape:window-x=\"3942\"\n inkscape:window-y=\"1348\"\n inkscape:window-maximized=\"0\"\n inkscape:current-layer=\"screenshot\" />\n <path\n d=\"M 9680,1890 V 400 h 165 165 v 695 694 l 97,101 c 152,159 270,241 398,276 58,16 190,18 264,4 122,-23 232,-106 283,-215 57,-123 58,-140 65,-878 l 6,-677 h 164 164 l -4,713 c -3,674 -5,717 -24,802 -75,330 -305,542 -634,585 -112,15 -193,8 -297,-25 -138,-44 -271,-130 -404,-262 l -78,-77 v 622 622 h -165 -165 z m 3660,0 V 400 h 165 165 v 690 690 l 63,73 c 131,150 312,280 442,316 58,16 211,14 280,-4 158,-42 248,-137 302,-320 15,-54 18,-128 21,-753 l 3,-692 h 165 165 l -3,733 c -4,719 -4,733 -26,812 -49,178 -160,342 -289,428 -123,81 -213,113 -365,129 -93,10 -118,9 -189,-6 -166,-36 -331,-130 -477,-272 -47,-46 -87,-84 -89,-84 -2,0 -3,279 -3,620 v 620 h -165 -165 z m -575,1418 c -3,-7 -88,-301 -191,-653 -102,-352 -313,-1081 -470,-1620 C 11948,496 11815,43 11810,28 l -9,-28 h 137 137 l 474,1618 c 261,889 481,1636 487,1660 l 13,42 h -140 c -103,0 -141,-3 -144,-12 z m 4525,-360 c -50,-132 -142,-317 -200,-405 -79,-120 -191,-225 -293,-274 -45,-22 -47,-25 -47,-66 v -43 h 199 200 l 3,-687 c 3,-616 6,-694 21,-748 60,-209 189,-333 385,-371 177,-34 350,2 504,103 l 38,26 v 134 135 l -32,-19 c -18,-10 -62,-30 -98,-44 -57,-21 -81,-24 -195,-24 -102,0 -136,4 -160,17 -46,25 -86,68 -109,118 -21,44 -21,58 -24,703 l -3,657 h 306 305 v 155 155 h -305 -305 v 295 295 h -73 -74 z M 3440,2504 c -14,-2 -59,-9 -100,-15 -169,-24 -382,-162 -518,-334 l -31,-40 -1,178 v 177 H 2625 2460 V 1235 0 h 165 165 v 341 341 l 67,-62 c 218,-199 456,-295 688,-275 450,37 786,352 892,837 23,105 26,441 5,528 -42,172 -89,280 -172,398 -139,197 -353,338 -580,381 -64,12 -214,21 -250,15 z m 194,-344 c 280,-74 464,-317 483,-641 22,-370 -192,-728 -492,-822 -59,-19 -93,-22 -220,-22 -145,0 -152,1 -221,31 -106,46 -174,95 -289,211 l -105,104 v 265 c 0,285 9,363 55,477 80,201 238,345 435,398 93,25 254,25 354,-1 z m 1947,339 c -110,-13 -214,-45 -326,-99 -511,-250 -739,-861 -521,-1397 93,-227 291,-441 509,-548 417,-204 913,-125 1238,197 198,197 304,440 316,723 14,318 -96,603 -314,820 -244,242 -549,345 -902,304 z m 335,-339 c 208,-53 365,-181 459,-375 63,-131 79,-205 80,-360 0,-235 -63,-392 -220,-551 -104,-105 -186,-152 -317,-185 -113,-28 -317,-23 -423,10 -225,72 -411,271 -475,509 -45,169 -28,391 42,550 73,165 234,322 388,377 135,49 330,59 466,25 z m 2679,336 c -343,-57 -565,-294 -565,-602 0,-184 76,-350 199,-433 84,-58 137,-81 366,-166 304,-112 372,-151 416,-236 63,-125 -30,-298 -193,-360 -56,-21 -79,-24 -208,-24 -131,0 -155,3 -243,29 -55,16 -159,59 -233,96 l -134,66 V 693 520 l 73,-36 c 140,-71 330,-123 509,-138 152,-14 362,35 498,116 136,81 259,242 290,383 6,28 11,89 11,136 0,185 -87,333 -250,428 -78,46 -108,59 -348,145 -217,78 -266,102 -315,153 -121,125 -102,311 42,407 70,46 149,66 262,66 165,0 308,-41 471,-134 l 77,-44 v 174 173 l -44,26 c -179,105 -469,156 -681,121 z m 7860,8 c -11,-2 -45,-9 -75,-15 -152,-31 -368,-204 -478,-384 l -37,-60 -3,213 -2,212 h -165 -165 V 1435 400 h 165 165 v 630 630 l 56,91 c 124,201 233,321 330,366 29,13 89,29 134,35 69,10 93,10 159,-4 42,-9 97,-25 121,-37 24,-11 45,-21 47,-21 2,0 3,85 3,190 v 189 l -52,16 c -55,16 -169,27 -203,19 z M 290,1878 c 0,-730 7,-822 69,-988 137,-365 545,-584 961,-516 320,53 569,259 672,556 43,126 48,208 48,893 v 647 h -170 -170 v -642 c -1,-709 -3,-746 -60,-861 -57,-116 -178,-217 -308,-257 -92,-29 -244,-27 -333,3 -137,47 -251,141 -303,251 -55,116 -56,126 -56,844 v 662 H 465 290 Z M 7315,888 c -113,-41 -195,-150 -196,-261 -2,-121 56,-215 165,-266 75,-37 133,-40 206,-12 76,29 125,74 161,146 29,60 31,71 27,140 -4,60 -11,84 -34,122 -70,112 -217,171 -329,131 z\"\n transform=\"matrix(0.025,0,0,-0.025,172,135)\"\n fill=\"#000000\"\n stroke=\"none\"\n id=\"path58745\"\n style=\"display:none;-webkit-print-color-adjust:exact\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 182.87587,75.671899 c 0.75744,14.845009 -5.4956,46.240161 17.66486,46.370091 23.55316,-1.17501 17.66948,-23.85984 18.2092,-45.922691\"\n id=\"path58811\"\n sodipodi:nodetypes=\"ccc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 236.68231,75.208573 0.91278,62.367927\"\n id=\"path58813\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 242.48958,84.50798 c 47.71874,-31.139949 47.26786,54.84867 3.59911,34.95568\"\n id=\"path58815\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 291.8253,101.62618 c 4.82616,-34.739992 34.45558,-28.203694 43.59264,-12.473604 9.13784,15.731424 -7.21867,46.700294 -37.71009,27.146354\"\n id=\"path58817\"\n sodipodi:nodetypes=\"csc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"M 359.77592,126.1369 353.3902,113.40746\"\n id=\"path58819\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745;-webkit-print-color-adjust:exact\"\n d=\"m 351.93759,124.7436 10.50858,-9.61176\"\n id=\"path58819-8\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 402.88227,79.753777 c -22.04047,-12.809114 -35.45736,11.558708 -18.00926,17.40638 39.98739,13.652123 4.2711,32.110133 -10.25198,22.100363\"\n id=\"path58821\"\n sodipodi:nodetypes=\"ccc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 418.63576,53.072922 c 2.8441,18.861023 2.25991,47.872908 -0.19999,70.920108\"\n id=\"path58823\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 426.58888,82.656092 c 27.05913,-24.90877 36.26296,17.927048 24.2854,40.819378\"\n id=\"path58825\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745;-webkit-print-color-adjust:exact\"\n d=\"m 508.91998,52.649703 c 2.8441,18.86103 2.25991,47.872907 -0.19999,70.920107\"\n id=\"path58823-2\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745;-webkit-print-color-adjust:exact\"\n d=\"m 516.8731,82.232873 c 27.05913,-24.90877 36.26296,17.927047 24.2854,40.819377\"\n id=\"path58825-0\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"M 497.64037,40.645865 466.9699,147.60377\"\n id=\"path58827\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 563.11865,78.027376 1.24943,46.964894\"\n id=\"path58833\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 569.09548,85.410387 c 4.48697,-6.03352 8.72964,-12.478417 18.13758,-10.225202\"\n id=\"path58835\"\n sodipodi:nodetypes=\"cc\" />\n</svg>\n","output":"str","x":899.6666412353516,"y":612.9999771118164,"wires":[["f57dc82d2f012518"]]},{"id":"f57dc82d2f012518","type":"http response","z":"f346d45c81f595e5","name":"image/svg response","statusCode":"","headers":{"content-type":"image/svg+xml"},"x":1373.6666412353516,"y":612.9999771118164,"wires":[]},{"id":"39cf074fa2bfaf2a","type":"template","z":"f346d45c81f595e5","name":"page3 content","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<p>\nPage three contains a link to the Node-RED flow that made this happen. It works on any other Node-RED that happens to be in the vicinity.\n</p>\n\n<p>\n Link to the <a href=\"/example01/flow.json\">to the flow</a> that makes this happen.\n</p>\n\n<p>\n Finally, <a href=\"/example01/notfound\">this page does not</a> exist.\n</p>\n\n","output":"str","x":909.6666412353516,"y":568.2499771118164,"wires":[["a622f6c4342adac5"]]},{"id":"a622f6c4342adac5","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"","headers":{"content-type":"text/html"},"x":1403.6666412353516,"y":568.2499771118164,"wires":[]},{"id":"5cb9be50d953ec61","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"404","tot":"num"}],"x":1201.6666450500488,"y":299.4999723434448,"wires":[[]]},{"id":"1be51f04e59403bc","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"Page two is far more interesting","tot":"str"}],"x":1181.6666450500488,"y":109.99997234344482,"wires":[[]]},{"id":"052939ee49dc884f","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"This is page number one","tot":"str"}],"x":1181.6666450500488,"y":204.74997234344482,"wires":[[]]},{"id":"d0794bae04b5a721","type":"delay","z":"f346d45c81f595e5","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"500","randomUnits":"milliseconds","drop":false,"allowrate":false,"outputs":1,"x":572.6666450500488,"y":208.99997234344482,"wires":[["e5324341bc9a0a54","0455e52d6481298a","fb940a9af3e05b41"]]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"f346d45c81f595e5","type":"tab","label":"[http] http static routing","disabled":false,"info":"Simple example of how to do http routing visuallying in the flow editor.\n\nThis can be started in Erlang-RED by deploying to the server and then can be accessed by another browser.","env":[{"name":"ERED_NOT_EUNIT","type":"bool","value":"true"},{"name":"ERED_PENDING","type":"bool","value":"false"},{"name":"ERED_TIMEOUT","type":"num","value":"4"},{"name":"NRED_TIMEOUT","type":"num","value":"5"}]},{"id":"abfa2c020b95ae9e","type":"http in","z":"f346d45c81f595e5","name":"","url":"/tf346d45c81f595e5/example01/:page","method":"get","upload":false,"swaggerDoc":"","x":319,"y":581,"wires":[["6fc97c857a69a1be"]]},{"id":"6fc97c857a69a1be","type":"switch","z":"f346d45c81f595e5","name":"","property":"req.params.page","propertyType":"msg","rules":[{"t":"eq","v":"page1","vt":"str"},{"t":"eq","v":"page2","vt":"str"},{"t":"eq","v":"page3","vt":"str"},{"t":"eq","v":"image.svg","vt":"str"},{"t":"eq","v":"flow.json","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":6,"x":637.6666412353516,"y":580.9999771118164,"wires":[["83b4ccd0b619f244"],["a89f0c5387dccd4e"],["39cf074fa2bfaf2a"],["3476bc4af55f68a1"],["6a7dedbc8c6db7fa"],["3d8825286adab940"]]},{"id":"83b4ccd0b619f244","type":"template","z":"f346d45c81f595e5","name":"page1 content","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<p>\nThis is page number one, routed to you by Erlang-RED <i>the visual flow based programming tool</i> powered by Node-RED flow editor.\n</p>\n\n<a href=\"/example01/page2\">Next Page</a>\n\n<br>\n","output":"str","x":907,"y":466.2499771118164,"wires":[["77688de786ca2329"]]},{"id":"77688de786ca2329","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"","headers":{"content-type":"text/html"},"x":1623.6666412353516,"y":466.2499771118164,"wires":[]},{"id":"43901891b8b31e0b","type":"inject","z":"f346d45c81f595e5","name":"test starts here","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220.6666259765625,"y":242.99996948242188,"wires":[["102fd7bdce5436df"]]},{"id":"0455e52d6481298a","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"5547143aaad383fe","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":970.6666450500488,"y":204.9999861717224,"wires":[["052939ee49dc884f"]]},{"id":"3d8825286adab940","type":"template","z":"f346d45c81f595e5","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<b>Page Not Found</b>\n","output":"str","x":887,"y":717.2499771118164,"wires":[["2b0fadc5c3583f16"]]},{"id":"2b0fadc5c3583f16","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"404","headers":{"content-type":"text/html"},"x":1623.6666412353516,"y":717.2499771118164,"wires":[]},{"id":"fb940a9af3e05b41","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"5547143aaad383fe","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":962.6666259765625,"y":271.4999694824219,"wires":[["5cb9be50d953ec61"]]},{"id":"e5324341bc9a0a54","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"5547143aaad383fe","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":952.6666450500488,"y":144.4999861717224,"wires":[["1be51f04e59403bc"]]},{"id":"a89f0c5387dccd4e","type":"template","z":"f346d45c81f595e5","name":"page2 content","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<p>\nPage two is far more interesting since it contains an image.\n</p>\n\n<img src=\"/example01/image.svg\"/>\n\n<P>\n <a href=\"/example01/page3\">Page three</a> contains a missling page to check the 404 errors are also available.\n</p>","output":"str","x":907,"y":520.2499771118164,"wires":[["918ac7df0c29647d"]]},{"id":"918ac7df0c29647d","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"","headers":{"content-type":"text/html"},"x":1623.6666412353516,"y":520.2499771118164,"wires":[]},{"id":"518f379024ec6e32","type":"file in","z":"f346d45c81f595e5","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":1369.66650390625,"y":667.625,"wires":[["ef94e7d30f2abf0a"]]},{"id":"ef94e7d30f2abf0a","type":"http response","z":"f346d45c81f595e5","name":"json response","statusCode":"","headers":{"content-type":"application/json"},"x":1613.6666412353516,"y":667.625,"wires":[]},{"id":"3476bc4af55f68a1","type":"template","z":"f346d45c81f595e5","name":"image.svg","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg\n id=\"screenshot\"\n viewBox=\"0 0 750 213\"\n width=\"750\"\n height=\"213\"\n version=\"1.1\"\n style=\"-webkit-print-color-adjust: exact;\"\n sodipodi:docname=\"cut-uposh_hr.svg\"\n inkscape:version=\"1.2 (dc2aeda, 2022-05-15)\"\n xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:svg=\"http://www.w3.org/2000/svg\">\n <defs\n id=\"defs58754\" />\n <sodipodi:namedview\n id=\"namedview58752\"\n pagecolor=\"#ffffff\"\n bordercolor=\"#000000\"\n borderopacity=\"0.25\"\n inkscape:showpageshadow=\"2\"\n inkscape:pageopacity=\"0.0\"\n inkscape:pagecheckerboard=\"0\"\n inkscape:deskcolor=\"#d1d1d1\"\n showgrid=\"false\"\n inkscape:zoom=\"3.1338441\"\n inkscape:cx=\"417.21922\"\n inkscape:cy=\"87.432555\"\n inkscape:window-width=\"1573\"\n inkscape:window-height=\"484\"\n inkscape:window-x=\"3942\"\n inkscape:window-y=\"1348\"\n inkscape:window-maximized=\"0\"\n inkscape:current-layer=\"screenshot\" />\n <path\n d=\"M 9680,1890 V 400 h 165 165 v 695 694 l 97,101 c 152,159 270,241 398,276 58,16 190,18 264,4 122,-23 232,-106 283,-215 57,-123 58,-140 65,-878 l 6,-677 h 164 164 l -4,713 c -3,674 -5,717 -24,802 -75,330 -305,542 -634,585 -112,15 -193,8 -297,-25 -138,-44 -271,-130 -404,-262 l -78,-77 v 622 622 h -165 -165 z m 3660,0 V 400 h 165 165 v 690 690 l 63,73 c 131,150 312,280 442,316 58,16 211,14 280,-4 158,-42 248,-137 302,-320 15,-54 18,-128 21,-753 l 3,-692 h 165 165 l -3,733 c -4,719 -4,733 -26,812 -49,178 -160,342 -289,428 -123,81 -213,113 -365,129 -93,10 -118,9 -189,-6 -166,-36 -331,-130 -477,-272 -47,-46 -87,-84 -89,-84 -2,0 -3,279 -3,620 v 620 h -165 -165 z m -575,1418 c -3,-7 -88,-301 -191,-653 -102,-352 -313,-1081 -470,-1620 C 11948,496 11815,43 11810,28 l -9,-28 h 137 137 l 474,1618 c 261,889 481,1636 487,1660 l 13,42 h -140 c -103,0 -141,-3 -144,-12 z m 4525,-360 c -50,-132 -142,-317 -200,-405 -79,-120 -191,-225 -293,-274 -45,-22 -47,-25 -47,-66 v -43 h 199 200 l 3,-687 c 3,-616 6,-694 21,-748 60,-209 189,-333 385,-371 177,-34 350,2 504,103 l 38,26 v 134 135 l -32,-19 c -18,-10 -62,-30 -98,-44 -57,-21 -81,-24 -195,-24 -102,0 -136,4 -160,17 -46,25 -86,68 -109,118 -21,44 -21,58 -24,703 l -3,657 h 306 305 v 155 155 h -305 -305 v 295 295 h -73 -74 z M 3440,2504 c -14,-2 -59,-9 -100,-15 -169,-24 -382,-162 -518,-334 l -31,-40 -1,178 v 177 H 2625 2460 V 1235 0 h 165 165 v 341 341 l 67,-62 c 218,-199 456,-295 688,-275 450,37 786,352 892,837 23,105 26,441 5,528 -42,172 -89,280 -172,398 -139,197 -353,338 -580,381 -64,12 -214,21 -250,15 z m 194,-344 c 280,-74 464,-317 483,-641 22,-370 -192,-728 -492,-822 -59,-19 -93,-22 -220,-22 -145,0 -152,1 -221,31 -106,46 -174,95 -289,211 l -105,104 v 265 c 0,285 9,363 55,477 80,201 238,345 435,398 93,25 254,25 354,-1 z m 1947,339 c -110,-13 -214,-45 -326,-99 -511,-250 -739,-861 -521,-1397 93,-227 291,-441 509,-548 417,-204 913,-125 1238,197 198,197 304,440 316,723 14,318 -96,603 -314,820 -244,242 -549,345 -902,304 z m 335,-339 c 208,-53 365,-181 459,-375 63,-131 79,-205 80,-360 0,-235 -63,-392 -220,-551 -104,-105 -186,-152 -317,-185 -113,-28 -317,-23 -423,10 -225,72 -411,271 -475,509 -45,169 -28,391 42,550 73,165 234,322 388,377 135,49 330,59 466,25 z m 2679,336 c -343,-57 -565,-294 -565,-602 0,-184 76,-350 199,-433 84,-58 137,-81 366,-166 304,-112 372,-151 416,-236 63,-125 -30,-298 -193,-360 -56,-21 -79,-24 -208,-24 -131,0 -155,3 -243,29 -55,16 -159,59 -233,96 l -134,66 V 693 520 l 73,-36 c 140,-71 330,-123 509,-138 152,-14 362,35 498,116 136,81 259,242 290,383 6,28 11,89 11,136 0,185 -87,333 -250,428 -78,46 -108,59 -348,145 -217,78 -266,102 -315,153 -121,125 -102,311 42,407 70,46 149,66 262,66 165,0 308,-41 471,-134 l 77,-44 v 174 173 l -44,26 c -179,105 -469,156 -681,121 z m 7860,8 c -11,-2 -45,-9 -75,-15 -152,-31 -368,-204 -478,-384 l -37,-60 -3,213 -2,212 h -165 -165 V 1435 400 h 165 165 v 630 630 l 56,91 c 124,201 233,321 330,366 29,13 89,29 134,35 69,10 93,10 159,-4 42,-9 97,-25 121,-37 24,-11 45,-21 47,-21 2,0 3,85 3,190 v 189 l -52,16 c -55,16 -169,27 -203,19 z M 290,1878 c 0,-730 7,-822 69,-988 137,-365 545,-584 961,-516 320,53 569,259 672,556 43,126 48,208 48,893 v 647 h -170 -170 v -642 c -1,-709 -3,-746 -60,-861 -57,-116 -178,-217 -308,-257 -92,-29 -244,-27 -333,3 -137,47 -251,141 -303,251 -55,116 -56,126 -56,844 v 662 H 465 290 Z M 7315,888 c -113,-41 -195,-150 -196,-261 -2,-121 56,-215 165,-266 75,-37 133,-40 206,-12 76,29 125,74 161,146 29,60 31,71 27,140 -4,60 -11,84 -34,122 -70,112 -217,171 -329,131 z\"\n transform=\"matrix(0.025,0,0,-0.025,172,135)\"\n fill=\"#000000\"\n stroke=\"none\"\n id=\"path58745\"\n style=\"display:none;-webkit-print-color-adjust:exact\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 182.87587,75.671899 c 0.75744,14.845009 -5.4956,46.240161 17.66486,46.370091 23.55316,-1.17501 17.66948,-23.85984 18.2092,-45.922691\"\n id=\"path58811\"\n sodipodi:nodetypes=\"ccc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 236.68231,75.208573 0.91278,62.367927\"\n id=\"path58813\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 242.48958,84.50798 c 47.71874,-31.139949 47.26786,54.84867 3.59911,34.95568\"\n id=\"path58815\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 291.8253,101.62618 c 4.82616,-34.739992 34.45558,-28.203694 43.59264,-12.473604 9.13784,15.731424 -7.21867,46.700294 -37.71009,27.146354\"\n id=\"path58817\"\n sodipodi:nodetypes=\"csc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"M 359.77592,126.1369 353.3902,113.40746\"\n id=\"path58819\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745;-webkit-print-color-adjust:exact\"\n d=\"m 351.93759,124.7436 10.50858,-9.61176\"\n id=\"path58819-8\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 402.88227,79.753777 c -22.04047,-12.809114 -35.45736,11.558708 -18.00926,17.40638 39.98739,13.652123 4.2711,32.110133 -10.25198,22.100363\"\n id=\"path58821\"\n sodipodi:nodetypes=\"ccc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 418.63576,53.072922 c 2.8441,18.861023 2.25991,47.872908 -0.19999,70.920108\"\n id=\"path58823\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 426.58888,82.656092 c 27.05913,-24.90877 36.26296,17.927048 24.2854,40.819378\"\n id=\"path58825\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745;-webkit-print-color-adjust:exact\"\n d=\"m 508.91998,52.649703 c 2.8441,18.86103 2.25991,47.872907 -0.19999,70.920107\"\n id=\"path58823-2\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745;-webkit-print-color-adjust:exact\"\n d=\"m 516.8731,82.232873 c 27.05913,-24.90877 36.26296,17.927047 24.2854,40.819377\"\n id=\"path58825-0\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"M 497.64037,40.645865 466.9699,147.60377\"\n id=\"path58827\"\n sodipodi:nodetypes=\"cc\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 563.11865,78.027376 1.24943,46.964894\"\n id=\"path58833\" />\n <path\n style=\"fill:none;stroke:#ff0000;stroke-width:5.205;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.980745\"\n d=\"m 569.09548,85.410387 c 4.48697,-6.03352 8.72964,-12.478417 18.13758,-10.225202\"\n id=\"path58835\"\n sodipodi:nodetypes=\"cc\" />\n</svg>\n","output":"str","x":897,"y":612.9999771118164,"wires":[["f57dc82d2f012518"]]},{"id":"f57dc82d2f012518","type":"http response","z":"f346d45c81f595e5","name":"image/svg response","statusCode":"","headers":{"content-type":"image/svg+xml"},"x":1593.6666412353516,"y":612.9999771118164,"wires":[]},{"id":"39cf074fa2bfaf2a","type":"template","z":"f346d45c81f595e5","name":"page3 content","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<p>\nPage three contains a link to the Node-RED flow that made this happen. It works on any other Node-RED that happens to be in the vicinity.\n</p>\n\n<p>\n Link to the <a href=\"/example01/flow.json\">to the flow</a> that makes this happen.\n</p>\n\n<p>\n Finally, <a href=\"/example01/notfound\">this page does not</a> exist.\n</p>\n\n","output":"str","x":907,"y":568.2499771118164,"wires":[["a622f6c4342adac5"]]},{"id":"a622f6c4342adac5","type":"http response","z":"f346d45c81f595e5","name":"html content","statusCode":"","headers":{"content-type":"text/html"},"x":1623.6666412353516,"y":568.2499771118164,"wires":[]},{"id":"5cb9be50d953ec61","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"404","tot":"num"}],"x":1213.6666259765625,"y":271.4999694824219,"wires":[[]]},{"id":"1be51f04e59403bc","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"Page two is far more interesting","tot":"str"}],"x":1181.6666450500488,"y":144.4999861717224,"wires":[[]]},{"id":"052939ee49dc884f","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"mth","to":"This is page number one","tot":"str"}],"x":1181.6666450500488,"y":204.9999861717224,"wires":[[]]},{"id":"6a7dedbc8c6db7fa","type":"ut-config","z":"f346d45c81f595e5","name":"","x":907,"y":667.625,"wires":[["810c21a0effe2222"]]},{"id":"810c21a0effe2222","type":"change","z":"f346d45c81f595e5","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"$$.utcfg.priv & \"/testdata/test.json\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1143,"y":667.625,"wires":[["518f379024ec6e32"]]},{"id":"102fd7bdce5436df","type":"ut-config","z":"f346d45c81f595e5","name":"","x":430.9999809265137,"y":242.99999713897705,"wires":[["f0ab252e1aaa97e5","86397e55eb8b9ace","6c07d6249a439870","4f7bd7f92e346104"]]},{"id":"f0ab252e1aaa97e5","type":"change","z":"f346d45c81f595e5","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/tf346d45c81f595e5/example01/page2\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":727,"y":144.4999861717224,"wires":[["e5324341bc9a0a54"]]},{"id":"86397e55eb8b9ace","type":"change","z":"f346d45c81f595e5","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/tf346d45c81f595e5/example01/page1\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":753,"y":204.9999861717224,"wires":[["0455e52d6481298a"]]},{"id":"6c07d6249a439870","type":"change","z":"f346d45c81f595e5","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/tf346d45c81f595e5/example01/unknown\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":737.9999809265137,"y":271.4999694824219,"wires":[["fb940a9af3e05b41"]]},{"id":"5d22438b62c62de1","type":"http request","z":"f346d45c81f595e5","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"5547143aaad383fe","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":944,"y":337.75,"wires":[["07a31d0af6c6c038"]]},{"id":"07a31d0af6c6c038","type":"ut-assert-values","z":"f346d45c81f595e5","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"statusCode","pt":"msg","to":"200","tot":"num"},{"t":"eql","p":"payload[0]","pt":"msg","to":"{\"disabled\":false,\"env\":[],\"id\":\"9e7ccc97f80d9afb\",\"info\":\"A file name can also be dynamic and be taken from the msg object passed to the file in node.\",\"label\":\"[file in] will accept file name from msg obj\",\"type\":\"tab\"}","tot":"json"}],"x":1140,"y":337.75,"wires":[[]]},{"id":"4f7bd7f92e346104","type":"change","z":"f346d45c81f595e5","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/tf346d45c81f595e5/example01/flow.json\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":719.3333549499512,"y":337.75,"wires":[["5d22438b62c62de1"]]},{"id":"5547143aaad383fe","type":"tls-config","name":"f346d45c81f595e5-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
@@ -1 +1 @@
1
- [{"id":"3be6bc074c7647bd","type":"tab","label":"[http] multiple endpoints don't all get the request","disabled":false,"info":"If there are multiple endpoints that are completely same, then ordering of definition takes precedents.\n\nAn endpoint is the same when method and path are the same.\n\nSince we don't know which order the endpoints are defined by ErlangRED, we collect together all their outputs and join to form an array of size 1.\n\nIf multiple messages are generated then the join 2 will trigger and hence cause a failure.\n\nOne request, one message and one response, regardless of the number of endpoints.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"5","type":"num"}]},{"id":"6f3510804fc3bee4","type":"junction","z":"3be6bc074c7647bd","x":795.0816414356232,"y":280.75,"wires":[["632ce57e1e3a5325","5208ae0ad47c65ba"]]},{"id":"8fc6e3d06952961c","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":345,"y":280.75,"wires":[["6f3510804fc3bee4"]]},{"id":"5208ae0ad47c65ba","type":"ut-assert-success","z":"3be6bc074c7647bd","name":"","count":1,"x":1036,"y":280.75,"wires":[]},{"id":"699c2aea3ddbdbaa","type":"inject","z":"3be6bc074c7647bd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":645,"y":1116,"wires":[["2a450c41c1b18bc4"]]},{"id":"2a450c41c1b18bc4","type":"http request","z":"3be6bc074c7647bd","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/t3be6bc074c7647bd/example06/data","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":922,"y":1045,"wires":[["14438173ea65a0da","3da4d3a3903f38ae"]]},{"id":"14438173ea65a0da","type":"ut-assert-success","z":"3be6bc074c7647bd","name":"","count":1,"x":1216,"y":1046,"wires":[]},{"id":"f1505d2f3d4bd3c1","type":"http response","z":"3be6bc074c7647bd","name":"","statusCode":"200","headers":{},"x":1012,"y":485,"wires":[]},{"id":"632ce57e1e3a5325","type":"change","z":"3be6bc074c7647bd","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"ok","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":989,"y":422,"wires":[["f1505d2f3d4bd3c1"]]},{"id":"3da4d3a3903f38ae","type":"ut-assert-values","z":"3be6bc074c7647bd","name":"","rules":[{"p":"payload","pt":"msg","t":"eql","to":"ok","tot":"str"}],"x":1236,"y":952.5,"wires":[[]]},{"id":"6075c92606ad6bc3","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":303,"y":350,"wires":[["6f3510804fc3bee4"]]},{"id":"3fe808e4d905d92c","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":349,"y":420,"wires":[["6f3510804fc3bee4"]]},{"id":"a5c3c0556921b32e","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":413,"y":491,"wires":[["6f3510804fc3bee4"]]},{"id":"4fe04ea22f685e60","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":477,"y":552,"wires":[["6f3510804fc3bee4"]]},{"id":"a8e3f4cfbf278d63","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":548,"y":614,"wires":[["6f3510804fc3bee4"]]},{"id":"890bf6f79888e762","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":572,"y":684,"wires":[["6f3510804fc3bee4"]]},{"id":"9766fef2f5da140d","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":624,"y":737,"wires":[["6f3510804fc3bee4"]]},{"id":"6e058edf3b2d3d2e","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":419,"y":219,"wires":[["6f3510804fc3bee4"]]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"3be6bc074c7647bd","type":"tab","label":"[http] multiple endpoints don't all get the request","disabled":false,"info":"If there are multiple endpoints that are completely same, then ordering of definition takes precedents.\n\nAn endpoint is the same when method and path are the same.\n\nSince we don't know which order the endpoints are defined by ErlangRED, we collect together all their outputs and join to form an array of size 1.\n\nIf multiple messages are generated then the join 2 will trigger and hence cause a failure.\n\nOne request, one message and one response, regardless of the number of endpoints.","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"5","type":"num"}]},{"id":"6f3510804fc3bee4","type":"junction","z":"3be6bc074c7647bd","x":795.0816414356232,"y":280.75,"wires":[["632ce57e1e3a5325","5208ae0ad47c65ba"]]},{"id":"8fc6e3d06952961c","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":345,"y":280.75,"wires":[["6f3510804fc3bee4"]]},{"id":"5208ae0ad47c65ba","type":"ut-assert-success","z":"3be6bc074c7647bd","name":"","count":1,"x":1036,"y":280.75,"wires":[]},{"id":"699c2aea3ddbdbaa","type":"inject","z":"3be6bc074c7647bd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":411,"y":1192,"wires":[["b7cf9e0ed3a65b62"]]},{"id":"2a450c41c1b18bc4","type":"http request","z":"3be6bc074c7647bd","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"d4ed04abac81535c","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":922,"y":1045,"wires":[["14438173ea65a0da","3da4d3a3903f38ae"]]},{"id":"14438173ea65a0da","type":"ut-assert-success","z":"3be6bc074c7647bd","name":"","count":1,"x":1216,"y":1046,"wires":[]},{"id":"f1505d2f3d4bd3c1","type":"http response","z":"3be6bc074c7647bd","name":"","statusCode":"200","headers":{},"x":1012,"y":485,"wires":[]},{"id":"632ce57e1e3a5325","type":"change","z":"3be6bc074c7647bd","name":"","rules":[{"p":"payload","pt":"msg","t":"set","to":"ok","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":989,"y":422,"wires":[["f1505d2f3d4bd3c1"]]},{"id":"3da4d3a3903f38ae","type":"ut-assert-values","z":"3be6bc074c7647bd","name":"","rules":[{"p":"payload","pt":"msg","t":"eql","to":"ok","tot":"str"}],"x":1236,"y":952.5,"wires":[[]]},{"id":"6075c92606ad6bc3","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":303,"y":350,"wires":[["6f3510804fc3bee4"]]},{"id":"3fe808e4d905d92c","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":349,"y":420,"wires":[["6f3510804fc3bee4"]]},{"id":"a5c3c0556921b32e","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":413,"y":491,"wires":[["6f3510804fc3bee4"]]},{"id":"4fe04ea22f685e60","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":477,"y":552,"wires":[["6f3510804fc3bee4"]]},{"id":"a8e3f4cfbf278d63","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":548,"y":614,"wires":[["6f3510804fc3bee4"]]},{"id":"890bf6f79888e762","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":572,"y":684,"wires":[["6f3510804fc3bee4"]]},{"id":"9766fef2f5da140d","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":624,"y":737,"wires":[["6f3510804fc3bee4"]]},{"id":"6e058edf3b2d3d2e","type":"http in","z":"3be6bc074c7647bd","name":"","url":"/t3be6bc074c7647bd/example06/data","method":"get","upload":false,"swaggerDoc":"","x":419,"y":219,"wires":[["6f3510804fc3bee4"]]},{"id":"1fb8c58fa9fd0add","type":"change","z":"3be6bc074c7647bd","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/t3be6bc074c7647bd/example06/data\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":755,"y":1094,"wires":[["2a450c41c1b18bc4"]]},{"id":"b7cf9e0ed3a65b62","type":"ut-config","z":"3be6bc074c7647bd","name":"","x":578,"y":1143,"wires":[["1fb8c58fa9fd0add"]]},{"id":"d4ed04abac81535c","type":"tls-config","name":"3be6bc074c7647bd-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
@@ -1 +1 @@
1
- [{"id":"27804627fb8f56bd","type":"tab","label":"[http] nodes should be able to handle requests","disabled":false,"info":"The http in node setups an endpoint and from the same flow, i.e. this one, the http request node makes a request to obtain the data that is stored in the template node.","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"3","type":"num"}]},{"id":"fc6d2a8652ac0a13","type":"http in","z":"27804627fb8f56bd","name":"","url":"/t27804627fb8f56bd/test/url","method":"get","upload":false,"swaggerDoc":"","x":185,"y":316,"wires":[["1e3a49fdb9c9a6a1"]]},{"id":"b35819f95cd15265","type":"http response","z":"27804627fb8f56bd","name":"","statusCode":"","headers":{},"x":762,"y":680,"wires":[]},{"id":"12559851e8165837","type":"inject","z":"27804627fb8f56bd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":189,"y":163.5,"wires":[["2b8834d322efe359"]]},{"id":"1e3a49fdb9c9a6a1","type":"template","z":"27804627fb8f56bd","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Hello world.\n\nAnd one more thing.\n\nThis is a test.\n\nBut should work.\n\n","output":"str","x":506,"y":498,"wires":[["b35819f95cd15265"]]},{"id":"93a68f36da4a0c36","type":"http request","z":"27804627fb8f56bd","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"${host}/t27804627fb8f56bd/test/url","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":594.3333333333334,"y":163.5,"wires":[["732ff0f8a0cdb2c9"]]},{"id":"2b8834d322efe359","type":"delay","z":"27804627fb8f56bd","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":386.6666666666667,"y":163.5,"wires":[["93a68f36da4a0c36"]]},{"id":"732ff0f8a0cdb2c9","type":"ut-assert-values","z":"27804627fb8f56bd","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"eql","to":"\"Hello world.\\n\\nAnd one more thing.\\n\\nThis is a test.\\n\\nBut should work.\\n\\n\"","tot":"json"}],"x":812,"y":163.5,"wires":[[]]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
1
+ [{"id":"27804627fb8f56bd","type":"tab","label":"[http] nodes should be able to handle requests","disabled":false,"info":"The http in node setups an endpoint and from the same flow, i.e. this one, the http request node makes a request to obtain the data that is stored in the template node.","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"3","type":"num"}]},{"id":"fc6d2a8652ac0a13","type":"http in","z":"27804627fb8f56bd","name":"","url":"/t27804627fb8f56bd/test/url","method":"get","upload":false,"skipBodyParsing":false,"swaggerDoc":"","x":185,"y":316,"wires":[["1e3a49fdb9c9a6a1"]]},{"id":"b35819f95cd15265","type":"http response","z":"27804627fb8f56bd","name":"","statusCode":"","headers":{},"x":762,"y":680,"wires":[]},{"id":"12559851e8165837","type":"inject","z":"27804627fb8f56bd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":189,"y":162.25,"wires":[["2b8834d322efe359"]]},{"id":"1e3a49fdb9c9a6a1","type":"template","z":"27804627fb8f56bd","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Hello world.\n\nAnd one more thing.\n\nThis is a test.\n\nBut should work.\n\n","output":"str","x":506,"y":498,"wires":[["b35819f95cd15265"]]},{"id":"93a68f36da4a0c36","type":"http request","z":"27804627fb8f56bd","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"6238011c76239592","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":953.4000000000001,"y":162.25,"wires":[["732ff0f8a0cdb2c9"]]},{"id":"2b8834d322efe359","type":"delay","z":"27804627fb8f56bd","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":367.6,"y":162.25,"wires":[["8a241ef84a314f88"]]},{"id":"732ff0f8a0cdb2c9","type":"ut-assert-values","z":"27804627fb8f56bd","name":"","rules":[{"p":"statusCode","pt":"msg","t":"eql","to":"200","tot":"num"},{"p":"payload","pt":"msg","t":"eql","to":"\"Hello world.\\n\\nAnd one more thing.\\n\\nThis is a test.\\n\\nBut should work.\\n\\n\"","tot":"json"}],"x":1152,"y":162.25,"wires":[[]]},{"id":"9177319e2b162c2a","type":"change","z":"27804627fb8f56bd","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"$$.utcfg.host & \"/t27804627fb8f56bd/test/url\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":764.8000000000001,"y":162.25,"wires":[["93a68f36da4a0c36"]]},{"id":"8a241ef84a314f88","type":"ut-config","z":"27804627fb8f56bd","name":"","x":566.2,"y":162.25,"wires":[["9177319e2b162c2a"]]},{"id":"6238011c76239592","type":"tls-config","name":"27804627fb8f56bd-tls-config","certType":"files","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]