@gregoriusrippenstein/erlang-red-unittest 0.21.0 → 0.21.7
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.
- package/examples/assert values/ignores failures if requested and boolean not-equal test.json +1 -0
- package/examples/catch/catch all in group except those handler elsewhere.json +1 -1
- package/examples/catch/deal with it yourself.json +1 -1
- package/examples/catch/don't catch if the node isn't selected.json +1 -1
- package/examples/change/set functionality.json +1 -1
- package/examples/complete/split node.json +1 -1
- package/examples/debug/Jsonata expressions in output field.json +1 -0
- package/examples/debug/ensure debug messages are generated.json +1 -1
- package/examples/debug/handle largish json files as content.json +1 -1
- package/examples/debug/status message counter.json +1 -1
- package/examples/debug/type hadling of JSONata results (ered).json +1 -0
- package/examples/debug/type hadling of JSONata results (node-red).json +1 -0
- package/examples/delay/respect the reset flag and dont pass on the reset msg.json +1 -0
- package/examples/exec/handle multiple process at once (ered).json +1 -0
- package/examples/exec/handle multiple process at once (nred).json +1 -0
- package/examples/exec/support timeout specification (ered).json +1 -0
- package/examples/exec/support timeout specification (nred).json +1 -0
- package/examples/exec/synchronised execution (ered).json +1 -0
- package/examples/exec/synchronised execution (nred).json +1 -0
- package/examples/file in/basic functionality of being able to read a file.json +1 -1
- package/examples/file in/will accept file name from msg obj.json +1 -1
- package/examples/filter/ignore initial value.json +1 -1
- package/examples/filter/post if value changed.json +1 -1
- package/examples/flowhubpull/retrieve flow id.json +1 -1
- package/examples/function/divide by zero throws kills node.json +1 -1
- package/examples/function/ensure /"on stop/" code is executed.json" +1 -1
- package/examples/function/function and module work together.json +1 -1
- package/examples/function/handle corrupt code.json +1 -1
- package/examples/function/set node context.json +1 -1
- package/examples/function/support timeout setting.json +1 -1
- package/examples/function/supports completed node.json +1 -1
- package/examples/http/Dynamic Routing.json +1 -1
- package/examples/http/POST & GET have different endpoints.json +1 -1
- package/examples/http/dynamic redirect.json +1 -1
- package/examples/http/have params in the path.json +1 -1
- package/examples/http/http static routing.json +1 -1
- package/examples/http/multiple endpoints don't all get the request.json +1 -1
- package/examples/http/nodes should be able to handle requests.json +1 -1
- package/examples/http/post requests - json content.json +1 -1
- package/examples/http/request parses JSON conent.json +1 -1
- package/examples/http/set content type.json +1 -1
- package/examples/http/support query string on get request.json +1 -1
- package/examples/inject/repeat interval.json +1 -1
- package/examples/inject/trigger after - does not trigger.json +1 -1
- package/examples/inject/unsupported JSONata function.json +1 -1
- package/examples/join/manual config with count & nested property name.json +1 -1
- package/examples/json/parse example json content.json +1 -1
- package/examples/json/raise exception if content not valid.json +1 -1
- package/examples/json/support prettify json content.json +1 -1
- package/examples/link nodes/across flow tabs.json +1 -1
- package/examples/link nodes/cascading link calls.json +1 -1
- package/examples/markdown/allow for inline html.json +1 -1
- package/examples/markdown/convert markdown to html.json +1 -1
- package/examples/markdown/support code block.json +1 -1
- package/examples/mqtt/auto-(re)connect.json +1 -1
- package/examples/range/basic examples.json +1 -1
- package/examples/split/Array type.json +1 -1
- package/examples/split/binary type.json +1 -1
- package/examples/split/work with binary data as string data (ered).json +1 -0
- package/examples/split/work with binary data as string data (nred).json +1 -0
- package/examples/statemachine/exception if no action to perform.json +1 -1
- package/examples/status/basic working version.json +1 -1
- package/examples/status/only one message per status value.json +1 -1
- package/examples/switch/JSONata undefined value & exceptions.json +1 -1
- package/examples/switch/post debug on JSONata exception.json +1 -1
- package/examples/switch/raise exception if JSONata has exception.json +1 -1
- package/examples/tcp/Bad value on output port (3425).json +1 -1
- package/examples/tcp/multiple tcp in connectors (1194).json +1 -1
- package/examples/template/support mustache template (ered).json +1 -0
- package/examples/template/support mustache template.json +1 -1
- package/nodes/locales/en-US/ut-config.html +25 -0
- package/nodes/locales/en-US/ut-config.json +14 -0
- package/nodes/ut-assert-debug.js +239 -2
- package/nodes/ut-config.html +70 -0
- package/nodes/ut-config.js +74 -0
- package/package.json +3 -2
- package/plugins/sidebar.html +79 -13
- package/priv/testdata/helloworld.txt +1 -0
- package/priv/testdata/test.json +126 -0
- package/examples/.core/assert values ignores failures if requested.json +0 -1
- package/examples/debug/handling of Jsonata expressions.json +0 -1
- package/examples/debug/type hadling of JSONata reslults (ered).json +0 -1
- package/examples/debug/type hadling of JSONata reslults (node-red).json +0 -1
- package/examples/exec/handle multiple process at once.json +0 -1
- package/examples/exec/support timeout specification.json +0 -1
- package/examples/exec/synchronised execution.json +0 -1
- package/examples/split/work with binary data as string data.json +0 -1
- /package/examples/comment/{what is there to test?.json → what is there to test-.json} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"6dd3a5754f83dc2e","type":"tab","label":"[function] set node context ","disabled":false,"info":"## Function Node Context\n\nBe able to set context between calls to the function node using the NodeDef parameter.\n\nThis does not work since the underlying implementation is async - meaning the function is triggered by a message and the results is sent as another message to the function node.\n\nIn the meantime, another message is received that uses an older context becase the updated context as not yet been sent back to the function node - from a previous message.\n\nHence this is a pending test that should be done down the road.\n\nMy preference would be to have a \"synchronised execution\" option on the function node so that it can be deactivated to speed up the function node.\n\nIf the function node only acts on the message, then there needs to be no serialisation of the execution.","env":[{"name":"ERED_PENDING","value":"true","type":"bool"}]},{"id":"bc538fc8417872a7","type":"inject","z":"6dd3a5754f83dc2e","name":"","props":[{"p":"counter","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":257,"y":600.8392333984375,"wires":[["f243244784e79961"]]},{"id":"f243244784e79961","type":"change","z":"6dd3a5754f83dc2e","name":"update counter","rules":[{"t":"set","p":"payload","pt":"msg","to":"counter","tot":"msg"},{"t":"set","p":"counter","pt":"msg","to":"$$.counter + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":501.5714111328125,"y":742.8392333984375,"wires":[["2c8c10171634cee5","e1e7f366de17a26c"]]},{"id":"2c8c10171634cee5","type":"switch","z":"6dd3a5754f83dc2e","name":"limit to 10_000 messages","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"10000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":512.5714111328125,"y":511.9999542236328,"wires":[["f243244784e79961"]]},{"id":"e1e7f366de17a26c","type":"function","z":"6dd3a5754f83dc2e","name":"update context of Node","func":"#{ '_counter' := C } = NodeDef,\n{ \n NodeDef#{ '_counter' => C + 1}, \n Msg#{ <<\"payload\">> => C } \n}\n","outputs":1,"timeout":0,"noerr":0,"initialize":"%% Code added here will be run once\n%% whenever the node is started.\nNodeDef#{ '_counter' => 0 }","finalize":"","libs":[],"x":844,"y":600,"wires":[[]]}]
|
|
1
|
+
[{"id":"6dd3a5754f83dc2e","type":"tab","label":"[function] set node context ","disabled":false,"info":"## Function Node Context\n\nBe able to set context between calls to the function node using the NodeDef parameter.\n\nThis does not work since the underlying implementation is async - meaning the function is triggered by a message and the results is sent as another message to the function node.\n\nIn the meantime, another message is received that uses an older context becase the updated context as not yet been sent back to the function node - from a previous message.\n\nHence this is a pending test that should be done down the road.\n\nMy preference would be to have a \"synchronised execution\" option on the function node so that it can be deactivated to speed up the function node.\n\nIf the function node only acts on the message, then there needs to be no serialisation of the execution.","env":[{"name":"ERED_PENDING","value":"true","type":"bool"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"bc538fc8417872a7","type":"inject","z":"6dd3a5754f83dc2e","name":"","props":[{"p":"counter","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":257,"y":600.8392333984375,"wires":[["f243244784e79961"]]},{"id":"f243244784e79961","type":"change","z":"6dd3a5754f83dc2e","name":"update counter","rules":[{"t":"set","p":"payload","pt":"msg","to":"counter","tot":"msg"},{"t":"set","p":"counter","pt":"msg","to":"$$.counter + 1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":501.5714111328125,"y":742.8392333984375,"wires":[["2c8c10171634cee5","e1e7f366de17a26c"]]},{"id":"2c8c10171634cee5","type":"switch","z":"6dd3a5754f83dc2e","name":"limit to 10_000 messages","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"10000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":512.5714111328125,"y":511.9999542236328,"wires":[["f243244784e79961"]]},{"id":"e1e7f366de17a26c","type":"function","z":"6dd3a5754f83dc2e","name":"update context of Node","func":"#{ '_counter' := C } = NodeDef,\n{ \n NodeDef#{ '_counter' => C + 1}, \n Msg#{ <<\"payload\">> => C } \n}\n","outputs":1,"timeout":0,"noerr":0,"initialize":"%% Code added here will be run once\n%% whenever the node is started.\nNodeDef#{ '_counter' => 0 }","finalize":"","libs":[],"x":844,"y":600,"wires":[[]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"f2f61ec9fc46a468","type":"tab","label":"[function] support timeout setting","disabled":false,"info":"## Function timeout support\n\nNon-negative timeout values in seconds.\n\nNegative and zero are intrepreted as being Infinite timeout.\n","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_TIMEOUT","value":"7","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"a2c9f90d9ea31a1f","type":"group","z":"f2f61ec9fc46a468","name":"disabled Node-RED Javascript code","style":{"label":true},"nodes":["1eee0e64c24bc099","2a05ee46ab296dc9"],"x":165,"y":1523,"w":494,"h":540},{"id":"e25627231644112e","type":"group","z":"f2f61ec9fc46a468","name":"timeout goes to debug panel if no catch caught the time out exception","style":{"label":true},"nodes":["5b347e54a92d9ff9","3e76245fbd5691b3","1fcfe383f4385b02","0e89114541b7fb2b","b5a8d6dddb17942c"],"x":161,"y":136.5,"w":960.5,"h":145},{"id":"0b1ae6a07c7f9ee1","type":"group","z":"f2f61ec9fc46a468","name":"all good, function completed before timeout - no exception, no debug","style":{"label":true},"nodes":["fd67b21de5786024","33112fdcb207fc20","9a58db73e33a0769","76a7f5738f160266","3695a84826fa554c","f2ea106b01f1a4c9","8fe028012828193d"],"x":155.5,"y":601.5,"w":969.5,"h":213},{"id":"28cbea3ee31a6c2a","type":"group","z":"f2f61ec9fc46a468","name":"timeout hits and catch handles exception","style":{"label":true},"nodes":["5186223e03d9b353","087e548f098823b0","c900bbc76f771c57","5bf64f22a8da1e1b","c589fe0cad265fb6","b4c5d5333e7fc298","0b8d34c24428d83e"],"x":161.5,"y":333,"w":960,"h":209.5},{"id":"fb9fdb40b651e3d8","type":"group","z":"f2f61ec9fc46a468","name":"all good, function completed before timeout - no exception, no debug","style":{"label":true},"nodes":["616ceb4757f22365","58d552991d0fc84b","d712e40a4c9c9ebf","9fabb5b3c93de925","0bae6e41684e87d5","375eb051e1d7e54c","e931271741768ce8"],"x":151,"y":868.5,"w":969.5,"h":213},{"id":"1eee0e64c24bc099","type":"group","z":"f2f61ec9fc46a468","g":"a2c9f90d9ea31a1f","name":"timeout of zero is infinity timeout","style":{"label":true},"nodes":["a2cf94ef446d743d","3363a0e7454b99ef","5504c9690eeecdc5"],"x":200,"y":1549,"w":433,"h":202},{"id":"2a05ee46ab296dc9","type":"group","z":"f2f61ec9fc46a468","g":"a2c9f90d9ea31a1f","name":"timeout of one","style":{"label":true},"nodes":["ee68ff84422283b9","71b45ad7258db27d","25a223e8463ca4fb"],"x":191,"y":1835,"w":422,"h":202},{"id":"5b347e54a92d9ff9","type":"function","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"one second timeout, 3 second sleep","func":"timer:sleep(3000), \nMsg\n","outputs":1,"timeout":"1","noerr":3,"initialize":"","finalize":"","libs":[],"x":577,"y":177.5,"wires":[["0e89114541b7fb2b"]]},{"id":"3e76245fbd5691b3","type":"inject","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":267,"y":177.5,"wires":[["5b347e54a92d9ff9"]]},{"id":"a2cf94ef446d743d","type":"function","z":"f2f61ec9fc46a468","g":"1eee0e64c24bc099","name":"function 39","func":"var idx = 0\nwhile ( idx < 10_000_000_000 ) {\n idx++\n}\nreturn msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":526,"y":1590,"wires":[[]]},{"id":"3363a0e7454b99ef","type":"inject","z":"f2f61ec9fc46a468","d":true,"g":"1eee0e64c24bc099","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":306,"y":1710,"wires":[["a2cf94ef446d743d"]]},{"id":"5504c9690eeecdc5","type":"catch","z":"f2f61ec9fc46a468","g":"1eee0e64c24bc099","name":"","scope":["a2cf94ef446d743d"],"uncaught":false,"x":557,"y":1661,"wires":[[]]},{"id":"ee68ff84422283b9","type":"function","z":"f2f61ec9fc46a468","g":"2a05ee46ab296dc9","name":"function 40","func":"while(1==1){};\n\nreturn msg;\n","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":517,"y":1876,"wires":[[]]},{"id":"71b45ad7258db27d","type":"inject","z":"f2f61ec9fc46a468","d":true,"g":"2a05ee46ab296dc9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":297,"y":1996,"wires":[["ee68ff84422283b9"]]},{"id":"25a223e8463ca4fb","type":"catch","z":"f2f61ec9fc46a468","g":"2a05ee46ab296dc9","name":"","scope":["ee68ff84422283b9"],"uncaught":false,"x":534,"y":1927,"wires":[[]]},{"id":"1fcfe383f4385b02","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","scope":["5b347e54a92d9ff9"],"nodeid":"5b347e54a92d9ff9","msgtype":"error","inverse":false,"x":642,"y":240.5,"wires":[["b5a8d6dddb17942c"]]},{"id":"0e89114541b7fb2b","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","x":905,"y":177.5,"wires":[]},{"id":"fd67b21de5786024","type":"function","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"three second timeout, one second sleep","func":"timer:sleep(1000), \nMsg\n","outputs":1,"timeout":"3","noerr":0,"initialize":"","finalize":"","libs":[],"x":568.5,"y":710.5,"wires":[["76a7f5738f160266"]]},{"id":"33112fdcb207fc20","type":"inject","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":261.5,"y":710.5,"wires":[["fd67b21de5786024"]]},{"id":"9a58db73e33a0769","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","scope":["fd67b21de5786024"],"nodeid":"fd67b21de5786024","msgtype":"error","inverse":true,"x":633.5,"y":773.5,"wires":[["8fe028012828193d"]]},{"id":"76a7f5738f160266","type":"ut-assert-success","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","count":1,"x":1009,"y":710.5,"wires":[]},{"id":"5186223e03d9b353","type":"function","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"one second timeout, 3 second sleep","func":"timer:sleep(3000), \nMsg\n","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":577.5,"y":439,"wires":[["5bf64f22a8da1e1b"]]},{"id":"087e548f098823b0","type":"inject","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":267.5,"y":439,"wires":[["5186223e03d9b353"]]},{"id":"c900bbc76f771c57","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","scope":["5186223e03d9b353"],"nodeid":"5186223e03d9b353","msgtype":"error","inverse":true,"x":642.5,"y":501.5,"wires":[["0b8d34c24428d83e"]]},{"id":"5bf64f22a8da1e1b","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","x":1005.5,"y":439,"wires":[]},{"id":"3695a84826fa554c","type":"catch","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","scope":["fd67b21de5786024"],"uncaught":false,"x":461,"y":643,"wires":[["f2ea106b01f1a4c9"]]},{"id":"f2ea106b01f1a4c9","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","x":1009,"y":642.5,"wires":[]},{"id":"c589fe0cad265fb6","type":"catch","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","scope":["5186223e03d9b353"],"uncaught":false,"x":480,"y":374,"wires":[["b4c5d5333e7fc298"]]},{"id":"b4c5d5333e7fc298","type":"ut-assert-success","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","count":1,"x":1005.5,"y":375,"wires":[]},{"id":"616ceb4757f22365","type":"function","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"zero second timeout, three second sleep","func":"timer:sleep(3000), \nMsg\n","outputs":1,"timeout":"0","noerr":0,"initialize":"","finalize":"","libs":[],"x":564,"y":977.5,"wires":[["9fabb5b3c93de925"]]},{"id":"58d552991d0fc84b","type":"inject","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":257,"y":977.5,"wires":[["616ceb4757f22365"]]},{"id":"d712e40a4c9c9ebf","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","scope":["fd67b21de5786024"],"nodeid":"fd67b21de5786024","msgtype":"error","inverse":true,"x":629,"y":1040.5,"wires":[["e931271741768ce8"]]},{"id":"9fabb5b3c93de925","type":"ut-assert-success","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","count":1,"x":1004.5,"y":977.5,"wires":[]},{"id":"0bae6e41684e87d5","type":"catch","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","scope":["616ceb4757f22365"],"uncaught":false,"x":456.5,"y":910,"wires":[["375eb051e1d7e54c"]]},{"id":"375eb051e1d7e54c","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","x":1004.5,"y":909.5,"wires":[]},{"id":"0b8d34c24428d83e","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","x":1005.5,"y":501.5,"wires":[]},{"id":"8fe028012828193d","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","x":1009,"y":773.5,"wires":[]},{"id":"e931271741768ce8","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","x":1004.5,"y":1040.5,"wires":[]},{"id":"b5a8d6dddb17942c","type":"ut-assert-values","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","ignore_failure_if_succeed":false,"rules":[{"p":"debug.nodeid","pt":"msg","t":"eql","to":"5b347e54a92d9ff9","tot":"str"},{"p":"debug.type","pt":"msg","t":"eql","to":"error","tot":"str"},{"p":"payload['level']","pt":"msg","t":"eql","to":"20","tot":"num"},{"p":"payload.format","pt":"msg","t":"eql","to":"object","tot":"str"},{"p":"payload.id","pt":"msg","t":"eql","to":"5b347e54a92d9ff9","tot":"str"},{"p":"payload.name","pt":"msg","t":"eql","to":"one second timeout, 3 second sleep","tot":"str"},{"p":"payload.msg.error_msg","pt":"msg","t":"eql","to":"unexpected exit","tot":"str"}],"x":1015.5,"y":240.5,"wires":[[]]}]
|
|
1
|
+
[{"id":"f2f61ec9fc46a468","type":"tab","label":"[function] support timeout setting","disabled":false,"info":"## Function timeout support\n\nNon-negative timeout values in seconds.\n\nNegative and zero are intrepreted as being Infinite timeout.\n","env":[{"name":"ERED_PENDING","value":"false","type":"bool"},{"name":"ERED_TIMEOUT","value":"7","type":"num"},{"name":"ERED_ONLY","value":"true","type":"bool"}]},{"id":"a2c9f90d9ea31a1f","type":"group","z":"f2f61ec9fc46a468","name":"disabled Node-RED Javascript code","style":{"label":true},"nodes":["1eee0e64c24bc099","2a05ee46ab296dc9"],"x":165,"y":1523,"w":494,"h":540},{"id":"e25627231644112e","type":"group","z":"f2f61ec9fc46a468","name":"timeout goes to debug panel if no catch caught the time out exception","style":{"label":true},"nodes":["5b347e54a92d9ff9","3e76245fbd5691b3","1fcfe383f4385b02","0e89114541b7fb2b","b5a8d6dddb17942c"],"x":161,"y":136.5,"w":960.5,"h":145},{"id":"0b1ae6a07c7f9ee1","type":"group","z":"f2f61ec9fc46a468","name":"all good, function completed before timeout - no exception, no debug","style":{"label":true},"nodes":["fd67b21de5786024","33112fdcb207fc20","9a58db73e33a0769","76a7f5738f160266","3695a84826fa554c","f2ea106b01f1a4c9","8fe028012828193d"],"x":155.5,"y":601.5,"w":969.5,"h":213},{"id":"28cbea3ee31a6c2a","type":"group","z":"f2f61ec9fc46a468","name":"timeout hits and catch handles exception","style":{"label":true},"nodes":["5186223e03d9b353","087e548f098823b0","c900bbc76f771c57","5bf64f22a8da1e1b","c589fe0cad265fb6","b4c5d5333e7fc298","0b8d34c24428d83e"],"x":161.5,"y":333,"w":960,"h":209.5},{"id":"fb9fdb40b651e3d8","type":"group","z":"f2f61ec9fc46a468","name":"all good, function completed before timeout - no exception, no debug","style":{"label":true},"nodes":["616ceb4757f22365","58d552991d0fc84b","d712e40a4c9c9ebf","9fabb5b3c93de925","0bae6e41684e87d5","375eb051e1d7e54c","e931271741768ce8"],"x":151,"y":868.5,"w":969.5,"h":213},{"id":"1eee0e64c24bc099","type":"group","z":"f2f61ec9fc46a468","g":"a2c9f90d9ea31a1f","name":"timeout of zero is infinity timeout","style":{"label":true},"nodes":["a2cf94ef446d743d","3363a0e7454b99ef","5504c9690eeecdc5"],"x":200,"y":1549,"w":433,"h":202},{"id":"2a05ee46ab296dc9","type":"group","z":"f2f61ec9fc46a468","g":"a2c9f90d9ea31a1f","name":"timeout of one","style":{"label":true},"nodes":["ee68ff84422283b9","71b45ad7258db27d","25a223e8463ca4fb"],"x":191,"y":1835,"w":422,"h":202},{"id":"5b347e54a92d9ff9","type":"function","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"one second timeout, 3 second sleep","func":"timer:sleep(3000), \nMsg\n","outputs":1,"timeout":"1","noerr":3,"initialize":"","finalize":"","libs":[],"x":577,"y":177.5,"wires":[["0e89114541b7fb2b"]]},{"id":"3e76245fbd5691b3","type":"inject","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":267,"y":177.5,"wires":[["5b347e54a92d9ff9"]]},{"id":"a2cf94ef446d743d","type":"function","z":"f2f61ec9fc46a468","g":"1eee0e64c24bc099","name":"function 39","func":"var idx = 0\nwhile ( idx < 10_000_000_000 ) {\n idx++\n}\nreturn msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":526,"y":1590,"wires":[[]]},{"id":"3363a0e7454b99ef","type":"inject","z":"f2f61ec9fc46a468","d":true,"g":"1eee0e64c24bc099","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":306,"y":1710,"wires":[["a2cf94ef446d743d"]]},{"id":"5504c9690eeecdc5","type":"catch","z":"f2f61ec9fc46a468","g":"1eee0e64c24bc099","name":"","scope":["a2cf94ef446d743d"],"uncaught":false,"x":557,"y":1661,"wires":[[]]},{"id":"ee68ff84422283b9","type":"function","z":"f2f61ec9fc46a468","g":"2a05ee46ab296dc9","name":"function 40","func":"while(1==1){};\n\nreturn msg;\n","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":517,"y":1876,"wires":[[]]},{"id":"71b45ad7258db27d","type":"inject","z":"f2f61ec9fc46a468","d":true,"g":"2a05ee46ab296dc9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":297,"y":1996,"wires":[["ee68ff84422283b9"]]},{"id":"25a223e8463ca4fb","type":"catch","z":"f2f61ec9fc46a468","g":"2a05ee46ab296dc9","name":"","scope":["ee68ff84422283b9"],"uncaught":false,"x":534,"y":1927,"wires":[[]]},{"id":"1fcfe383f4385b02","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","scope":["5b347e54a92d9ff9"],"nodeid":"5b347e54a92d9ff9","msgtype":"error","inverse":false,"x":642,"y":240.5,"wires":[["b5a8d6dddb17942c"]]},{"id":"0e89114541b7fb2b","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","x":905,"y":177.5,"wires":[]},{"id":"fd67b21de5786024","type":"function","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"three second timeout, one second sleep","func":"timer:sleep(1000), \nMsg\n","outputs":1,"timeout":"3","noerr":0,"initialize":"","finalize":"","libs":[],"x":568.5,"y":710.5,"wires":[["76a7f5738f160266"]]},{"id":"33112fdcb207fc20","type":"inject","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":261.5,"y":710.5,"wires":[["fd67b21de5786024"]]},{"id":"9a58db73e33a0769","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","scope":["fd67b21de5786024"],"nodeid":"fd67b21de5786024","msgtype":"error","inverse":true,"x":633.5,"y":773.5,"wires":[["8fe028012828193d"]]},{"id":"76a7f5738f160266","type":"ut-assert-success","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","count":1,"x":1009,"y":710.5,"wires":[]},{"id":"5186223e03d9b353","type":"function","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"one second timeout, 3 second sleep","func":"timer:sleep(3000), \nMsg\n","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":577.5,"y":439,"wires":[["5bf64f22a8da1e1b"]]},{"id":"087e548f098823b0","type":"inject","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":267.5,"y":439,"wires":[["5186223e03d9b353"]]},{"id":"c900bbc76f771c57","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","scope":["5186223e03d9b353"],"nodeid":"5186223e03d9b353","msgtype":"error","inverse":true,"x":642.5,"y":501.5,"wires":[["0b8d34c24428d83e"]]},{"id":"5bf64f22a8da1e1b","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","x":1005.5,"y":439,"wires":[]},{"id":"3695a84826fa554c","type":"catch","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","scope":["fd67b21de5786024"],"uncaught":false,"x":461,"y":643,"wires":[["f2ea106b01f1a4c9"]]},{"id":"f2ea106b01f1a4c9","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","x":1009,"y":642.5,"wires":[]},{"id":"c589fe0cad265fb6","type":"catch","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","scope":["5186223e03d9b353"],"uncaught":false,"x":480,"y":374,"wires":[["b4c5d5333e7fc298"]]},{"id":"b4c5d5333e7fc298","type":"ut-assert-success","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","count":1,"x":1005.5,"y":375,"wires":[]},{"id":"616ceb4757f22365","type":"function","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"zero second timeout, three second sleep","func":"timer:sleep(3000), \nMsg\n","outputs":1,"timeout":"0","noerr":0,"initialize":"","finalize":"","libs":[],"x":564,"y":977.5,"wires":[["9fabb5b3c93de925"]]},{"id":"58d552991d0fc84b","type":"inject","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":257,"y":977.5,"wires":[["616ceb4757f22365"]]},{"id":"d712e40a4c9c9ebf","type":"ut-assert-debug","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","scope":["fd67b21de5786024"],"nodeid":"fd67b21de5786024","msgtype":"error","inverse":true,"x":629,"y":1040.5,"wires":[["e931271741768ce8"]]},{"id":"9fabb5b3c93de925","type":"ut-assert-success","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","count":1,"x":1004.5,"y":977.5,"wires":[]},{"id":"0bae6e41684e87d5","type":"catch","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","scope":["616ceb4757f22365"],"uncaught":false,"x":456.5,"y":910,"wires":[["375eb051e1d7e54c"]]},{"id":"375eb051e1d7e54c","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","x":1004.5,"y":909.5,"wires":[]},{"id":"0b8d34c24428d83e","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"28cbea3ee31a6c2a","name":"","x":1005.5,"y":501.5,"wires":[]},{"id":"8fe028012828193d","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"0b1ae6a07c7f9ee1","name":"","x":1009,"y":773.5,"wires":[]},{"id":"e931271741768ce8","type":"ut-assert-failure","z":"f2f61ec9fc46a468","g":"fb9fdb40b651e3d8","name":"","x":1004.5,"y":1040.5,"wires":[]},{"id":"b5a8d6dddb17942c","type":"ut-assert-values","z":"f2f61ec9fc46a468","g":"e25627231644112e","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data.type","pt":"msg","to":"function","tot":"str"},{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.format","pt":"msg","to":"error","tot":"str"},{"t":"eql","p":"data.id","pt":"msg","to":"5b347e54a92d9ff9","tot":"str"},{"t":"eql","p":"data.name","pt":"msg","to":"one second timeout, 3 second sleep","tot":"str"},{"t":"eql","p":"data.msg.error_msg","pt":"msg","to":"unexpected exit","tot":"str"}],"x":1015.5,"y":240.5,"wires":[[]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"0c35d269ca7178c6","type":"tab","label":"[function] supports completed node","disabled":false,"info":"## Function node and message completion\n\nWhen has a function node completed with a message?\n\nIf that message was successfully handled, no timeout or illegal exit.\n\n","env":[{"name":"ERED_TIMEOUT","
|
|
1
|
+
[{"id":"0c35d269ca7178c6","type":"tab","label":"[function] supports completed node","disabled":false,"info":"## Function node and message completion\n\nWhen has a function node completed with a message?\n\nIf that message was successfully handled, no timeout or illegal exit.\n\n","env":[{"name":"ERED_TIMEOUT","type":"num","value":"8"},{"name":"ERED_ONLY","type":"bool","value":"true"}]},{"id":"f20328830b376b23","type":"group","z":"0c35d269ca7178c6","name":"successfully handled message","style":{"label":true},"nodes":["e854140ab6f0d21c","731d488b92cd68f1","b93f2509fb2a5bcc","55336fe53a868e93","6e9d36928e0ca025"],"x":207,"y":223.5,"w":760,"h":176.75},{"id":"c165d28f8005d7c4","type":"group","z":"0c35d269ca7178c6","name":"time out - no complete notification","style":{"label":true},"nodes":["0cdc8b8fcada2b64","084ee5f93fe80d0a","381a28ec2492ce63","aa5971bdea0f354c","1b7b76e14556c769","5a408c1c86dbbb6a","4b361478f333e8e2"],"x":207,"y":482.5,"w":1028,"h":234},{"id":"db361fcb415409b2","type":"group","z":"0c35d269ca7178c6","name":"bad arith exception - no complete","style":{"label":true},"nodes":["f5af604e178c08c0","4a8146bae13b5087","67c13f891a224fef","e1e0adb799026724","c6a558ec0e5e8ec9","9cd1030d04babc9d","3c162b8fa00c4058"],"x":208,"y":763.5,"w":1027,"h":234},{"id":"e854140ab6f0d21c","type":"function","z":"0c35d269ca7178c6","g":"f20328830b376b23","name":"function 2","func":" Msg\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":577,"y":359.25,"wires":[["6e9d36928e0ca025"]]},{"id":"731d488b92cd68f1","type":"complete","z":"0c35d269ca7178c6","g":"f20328830b376b23","name":"","scope":["e854140ab6f0d21c"],"uncaught":false,"x":584,"y":264.5,"wires":[["55336fe53a868e93"]]},{"id":"b93f2509fb2a5bcc","type":"inject","z":"0c35d269ca7178c6","g":"f20328830b376b23","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":313,"y":359.25,"wires":[["e854140ab6f0d21c"]]},{"id":"55336fe53a868e93","type":"ut-assert-success","z":"0c35d269ca7178c6","g":"f20328830b376b23","name":"","count":1,"x":848,"y":264.5,"wires":[]},{"id":"6e9d36928e0ca025","type":"ut-assert-success","z":"0c35d269ca7178c6","g":"f20328830b376b23","name":"","count":1,"x":851,"y":359.25,"wires":[]},{"id":"0cdc8b8fcada2b64","type":"function","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"timeout - no complete","func":"timer:sleep(2_000)\n","outputs":1,"timeout":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":617,"y":613.5,"wires":[["1b7b76e14556c769"]]},{"id":"084ee5f93fe80d0a","type":"complete","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"","scope":["0cdc8b8fcada2b64"],"uncaught":false,"x":584,"y":523.5,"wires":[["aa5971bdea0f354c"]]},{"id":"381a28ec2492ce63","type":"inject","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":313,"y":613.5,"wires":[["0cdc8b8fcada2b64"]]},{"id":"aa5971bdea0f354c","type":"ut-assert-failure","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"","x":883,"y":523.5,"wires":[]},{"id":"1b7b76e14556c769","type":"ut-assert-failure","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"","x":890,"y":613.5,"wires":[]},{"id":"5a408c1c86dbbb6a","type":"ut-assert-debug","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"","scope":["0cdc8b8fcada2b64"],"nodeid":"0cdc8b8fcada2b64","msgtype":"error","inverse":false,"x":729,"y":675.5,"wires":[["4b361478f333e8e2"]]},{"id":"f5af604e178c08c0","type":"function","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"divide by zero error","func":"1 / 0 ","outputs":1,"timeout":"0","noerr":0,"initialize":"","finalize":"","libs":[],"x":608,"y":894.5,"wires":[["c6a558ec0e5e8ec9"]]},{"id":"4a8146bae13b5087","type":"complete","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"","scope":["f5af604e178c08c0"],"uncaught":false,"x":585,"y":804.5,"wires":[["e1e0adb799026724"]]},{"id":"67c13f891a224fef","type":"inject","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":314,"y":894.5,"wires":[["f5af604e178c08c0"]]},{"id":"e1e0adb799026724","type":"ut-assert-failure","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"","x":884,"y":804.5,"wires":[]},{"id":"c6a558ec0e5e8ec9","type":"ut-assert-failure","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"","x":891,"y":894.5,"wires":[]},{"id":"9cd1030d04babc9d","type":"ut-assert-debug","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"","scope":["f5af604e178c08c0"],"nodeid":"f5af604e178c08c0","msgtype":"error","inverse":false,"x":720,"y":956.5,"wires":[["3c162b8fa00c4058"]]},{"id":"4b361478f333e8e2","type":"ut-assert-values","z":"0c35d269ca7178c6","g":"c165d28f8005d7c4","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.id","pt":"msg","to":"0cdc8b8fcada2b64","tot":"str"},{"t":"eql","p":"data.name","pt":"msg","to":"timeout - no complete","tot":"str"},{"t":"eql","p":"data.msg.error_msg","pt":"msg","to":"unexpected exit","tot":"str"}],"x":1129,"y":675.5,"wires":[[]]},{"id":"3c162b8fa00c4058","type":"ut-assert-values","z":"0c35d269ca7178c6","g":"db361fcb415409b2","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"data['level']","pt":"msg","to":"20","tot":"num"},{"t":"eql","p":"data.id","pt":"msg","to":"f5af604e178c08c0","tot":"str"},{"t":"eql","p":"data.name","pt":"msg","to":"divide by zero error","tot":"str"},{"t":"eql","p":"data.msg.error_msg","pt":"msg","to":"unexpected exit","tot":"str"}],"x":1129,"y":956.5,"wires":[[]]}]
|
|
@@ -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","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":"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":[{"p":"target","pt":"msg","t":"set","to":"\"[\" & msg.req.params.path1 & \"] \" & msg.req.params.path2","tot":"jsonata"},{"p":"target","pt":"msg","t":"set","to":"$toString($$.target)","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":"http://localhost:8080/c562c43e69bcf0af/example02/erlang/red","tls":"","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":"http://localhost:8080/c562c43e69bcf0af/example02/page/unknown","tls":"","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":"http://localhost:8080/c562c43e69bcf0af/example02/node/red","tls":"","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":[]}]
|
|
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 +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":"
|
|
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 +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","
|
|
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 +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","
|
|
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 +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","type":"bool","value":"true"},{"name":"ERED_PENDING","type":"bool","value":"false"},{"name":"ERED_TIMEOUT","type":"num","value":"4"}]},{"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":"http://localhost:8080/tf346d45c81f595e5/example01/page1","tls":"","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":"http://localhost:8080/tf346d45c81f595e5/example01/unknown","tls":"","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":"http://localhost:8080/tf346d45c81f595e5/example01/page2","tls":"","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"]]}]
|
|
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 +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":"
|
|
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 +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":"
|
|
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 +1 @@
|
|
|
1
|
-
[{"id":"b864b3e3510cd120","type":"tab","label":"[http] post requests - json content","disabled":false,"info":"Post requests have formdata form, handle binary data and json content or plain text.\n\n","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"3","type":"num"}]},{"id":"b29550d7fb531718","type":"http in","z":"b864b3e3510cd120","name":"","url":"/tb864b3e3510cd120/data","method":"post","upload":false,"swaggerDoc":"","x":197,"y":208.25,"wires":[["d44e6d2a2486f53e","fedba336ce487092","24654fde735ea5e5"]]},{"id":"6769eaa26a8493f1","type":"http response","z":"b864b3e3510cd120","name":"","statusCode":"200","headers":{},"x":612,"y":431,"wires":[]},{"id":"5a2c281c92f8b8c4","type":"http request","z":"b864b3e3510cd120","name":"","method":"POST","ret":"txt","paytoqs":"body","url":"
|
|
1
|
+
[{"id":"b864b3e3510cd120","type":"tab","label":"[http] post requests - json content","disabled":false,"info":"Post requests have formdata form, handle binary data and json content or plain text.\n\n","env":[{"name":"ERED_NOT_EUNIT","value":"true","type":"bool"},{"name":"ERED_TIMEOUT","value":"3","type":"num"}]},{"id":"b29550d7fb531718","type":"http in","z":"b864b3e3510cd120","name":"","url":"/tb864b3e3510cd120/data","method":"post","upload":false,"swaggerDoc":"","x":197,"y":208.25,"wires":[["d44e6d2a2486f53e","fedba336ce487092","24654fde735ea5e5"]]},{"id":"6769eaa26a8493f1","type":"http response","z":"b864b3e3510cd120","name":"","statusCode":"200","headers":{},"x":612,"y":431,"wires":[]},{"id":"5a2c281c92f8b8c4","type":"http request","z":"b864b3e3510cd120","name":"","method":"POST","ret":"txt","paytoqs":"body","url":"${host}/tb864b3e3510cd120/data","tls":"83cd62fbf15a01f3","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":608,"y":754,"wires":[["17f83f445e55daa6"]]},{"id":"9587bcbe2dfedfdd","type":"inject","z":"b864b3e3510cd120","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":199,"y":518,"wires":[["2e442f3b0bb40958"]]},{"id":"2e442f3b0bb40958","type":"template","z":"b864b3e3510cd120","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"plain","template":"{ \"value\": \"hello world\" }","output":"str","x":374,"y":638,"wires":[["5a2c281c92f8b8c4"]]},{"id":"d44e6d2a2486f53e","type":"template","z":"b864b3e3510cd120","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \n \"response\": {{{ payload }}}\n}","output":"str","x":420,"y":353,"wires":[["6769eaa26a8493f1"]]},{"id":"fedba336ce487092","type":"ut-assert-success","z":"b864b3e3510cd120","name":"","count":1,"x":452,"y":60.5,"wires":[]},{"id":"17f83f445e55daa6","type":"ut-assert-success","z":"b864b3e3510cd120","name":"","count":1,"x":884,"y":753,"wires":[]},{"id":"24654fde735ea5e5","type":"json","z":"b864b3e3510cd120","name":"","property":"payload","action":"","pretty":false,"x":508,"y":208.25,"wires":[["332f0fd7b72d092c"]]},{"id":"332f0fd7b72d092c","type":"ut-assert-values","z":"b864b3e3510cd120","name":"","rules":[{"p":"payload.value","pt":"msg","t":"eql","to":"hello world","tot":"str"},{"p":"payload","pt":"msg","t":"eql","to":"{ \"value\" : \"hello world\" }","tot":"json"}],"x":827,"y":208.25,"wires":[[]]},{"id":"83cd62fbf15a01f3","type":"tls-config","name":"","cert":"","key":"","p12":"","p12name":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":"","certEnv":"","keyEnv":"","caEnv":""}]
|