Code: Select all
[{"id":"5feeeadcac1b7bbf","type":"http in","z":"da0f4c84f298fc87","name":"","url":"/GET/temp/room101","method":"get","upload":false,"swaggerDoc":"","x":330,"y":110,"wires":[["668430ddcfeb42e8"]]},{"id":"5d0af497f8f2e1e2","type":"http response","z":"da0f4c84f298fc87","name":"","statusCode":"","headers":{},"x":742,"y":110,"wires":[]},{"id":"668430ddcfeb42e8","type":"function","z":"da0f4c84f298fc87","name":"send the response","func":"msg.payload = \"The temperature is 25.0 ℃ \";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":570,"y":110,"wires":[["5d0af497f8f2e1e2"]]},{"id":"45025a7f031d6d49","type":"http in","z":"da0f4c84f298fc87","name":"","url":"/GET/temp/room102","method":"get","upload":false,"swaggerDoc":"","x":330,"y":242,"wires":[["5b1e33fcac816333"]]},{"id":"a8cd2fb1dbd8df7c","type":"http response","z":"da0f4c84f298fc87","name":"","statusCode":"","headers":{},"x":786,"y":242,"wires":[]},{"id":"5b1e33fcac816333","type":"function","z":"da0f4c84f298fc87","name":"get parameter and display","func":"msg.payload = \"The temperature is set as \"+ msg.payload.tsu +\" ℃ \";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":594,"y":242,"wires":[["a8cd2fb1dbd8df7c"]]},{"id":"66b19aacf52e27b2","type":"http request","z":"da0f4c84f298fc87","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://127.0.0.1:10200/GET/temp/room102?tsu=19","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":470,"y":362,"wires":[["825e5269954d442e"]]},{"id":"c4fa942d47580f68","type":"inject","z":"da0f4c84f298fc87","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":362,"wires":[["66b19aacf52e27b2"]]},{"id":"825e5269954d442e","type":"debug","z":"da0f4c84f298fc87","name":"msg.payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":362,"wires":[]},{"id":"289423711f6ac9e7","type":"comment","z":"da0f4c84f298fc87","name":"HTTP API Client","info":"","x":300,"y":322,"wires":[]},{"id":"717fe9858da7c9a5","type":"comment","z":"da0f4c84f298fc87","name":"http://127.0.0.1:10200/GET/temp/room101 to call RESTful API","info":"","x":440,"y":66,"wires":[]},{"id":"6758c76b444de71e","type":"comment","z":"da0f4c84f298fc87","name":"http://127.0.0.1:10200/GET/temp/room102?tsu=[number] to call RESTful API","info":"","x":490,"y":198,"wires":[]}]