Node red is not giving http response

Below is the flow that I am using, the rest api will internally call the lwm2m service and returns response. I wanted to give the lwm2m service reponse as http reponse.

[{"id":"7ef85b8a.eecf74","type":"lwm2m client in","z":"d2ce8276.563c5","name":"","lwm2mClient":"9db4fd03.df67e","subscribeObjectEvents":false,"x":420,"y":260,"wires":[["7a71065c.0cac78","9c17b3fa.5004f"]]},{"id":"294af8c5.875f88","type":"inject","z":"d2ce8276.563c5","name":"","topic":"/420/0/0","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":200,"wires":[[]]},{"id":"7a71065c.0cac78","type":"debug","z":"d2ce8276.563c5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":240,"wires":[]},{"id":"fac15cc4.bc82e","type":"inject","z":"d2ce8276.563c5","name":"","topic":"^/3/.*","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["7ef85b8a.eecf74"]]},{"id":"22ad3db2.d0e3a2","type":"http in","z":"d2ce8276.563c5","name":"","url":"/test","method":"post","upload":false,"swaggerDoc":"","x":120,"y":360,"wires":[["c801b62c.ae9f28","fb4b035a.2aa67"]]},{"id":"9c17b3fa.5004f","type":"function","z":"d2ce8276.563c5","name":"","func":"msg = {\"payload\": msg.payload , \"req\":flow.get(\"req\"),\"res\":flow.get(\"res\"),\"_msgid\":flow.get(\"_msgid\")};\n//msg._msgid =flow.get(\"_msgid\");\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":280,"wires":[["7a71065c.0cac78","75cc265b.0fa4d8"]]},{"id":"44a35eaa.feede","type":"lwm2m client out","z":"d2ce8276.563c5","name":"","lwm2mClient":"9db4fd03.df67e","x":540,"y":500,"wires":[]},{"id":"a7658a4a.cb0ac8","type":"udp in","z":"d2ce8276.563c5","name":"","iface":"","port":"1203","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":120,"y":500,"wires":[["c2bfae43.2f572"]]},{"id":"c2bfae43.2f572","type":"function","z":"d2ce8276.563c5","name":"","func":"\nvar result=parseInt(msg.payload);\nmsg1=\n{\n \"topic\":\"/420/0/0\",\n \"payload\":result,\n \n}\n\n\nreturn msg1;","outputs":1,"noerr":0,"x":310,"y":500,"wires":[["44a35eaa.feede"]]},{"id":"75cc265b.0fa4d8","type":"http response","z":"d2ce8276.563c5","name":"","statusCode":"","headers":{},"x":770,"y":280,"wires":[]},{"id":"c801b62c.ae9f28","type":"debug","z":"d2ce8276.563c5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":310,"y":400,"wires":[]},{"id":"fb4b035a.2aa67","type":"function","z":"d2ce8276.563c5","name":"","func":"flow.set(\"req\", msg.req);\nflow.set(\"res\", msg.res);\nmsg ={ _msgid: msg._msgid, topic: msg.payload.topic , payload: '' };\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":340,"wires":[["7ef85b8a.eecf74"]]},{"id":"9db4fd03.df67e","type":"lwm2m client","z":"","disabled":false,"clientName":"TMPL-FA-1663","enableDTLS":false,"clientPort":"5683","lifetimeSec":"300","reconnectSec":"30","requestBootstrap":false,"saveProvisionedConfig":false,"useIPv4":true,"serverHost":"leshan.iot-lab.info","serverPort":"5683","redirectLwm2mClientLog":false,"dumpLwm2mMessages":false,"hideSensitiveInfo":true,"propagateInternalEvents":false,"objects":"{\"420\":{\"0\":{\"0\":{\"type\":\"INTEGER\",\"acl\":\"RW\",\"value\":4},\"1\":{\"type\":\"FUNCTION\",\"acl\":\"E\",\"value\":\"\"},\"2\":true}}}"}]

Please export your flow again, read this post and edit your post.

Please reread the post about how to post your flow

Below is the flow that I am using, the rest api will internally call the lwm2m service and returns response. I wanted to give the lwm2m service reponse as http reponse.

[{"id":"7ef85b8a.eecf74","type":"lwm2m client in","z":"d2ce8276.563c5","name":"","lwm2mClient":"9db4fd03.df67e","subscribeObjectEvents":false,"x":420,"y":260,"wires":[["7a71065c.0cac78","9c17b3fa.5004f"]]},{"id":"294af8c5.875f88","type":"inject","z":"d2ce8276.563c5","name":"","topic":"/420/0/0","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":200,"wires":[[]]},{"id":"7a71065c.0cac78","type":"debug","z":"d2ce8276.563c5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":240,"wires":[]},{"id":"fac15cc4.bc82e","type":"inject","z":"d2ce8276.563c5","name":"","topic":"^/3/.*","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["7ef85b8a.eecf74"]]},{"id":"22ad3db2.d0e3a2","type":"http in","z":"d2ce8276.563c5","name":"","url":"/test","method":"post","upload":false,"swaggerDoc":"","x":120,"y":360,"wires":[["c801b62c.ae9f28","fb4b035a.2aa67"]]},{"id":"9c17b3fa.5004f","type":"function","z":"d2ce8276.563c5","name":"","func":"msg = {\"payload\": msg.payload , \"req\":flow.get(\"req\"),\"res\":flow.get(\"res\"),\"_msgid\":flow.get(\"_msgid\")};\n//msg._msgid =flow.get(\"_msgid\");\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":280,"wires":[["7a71065c.0cac78","75cc265b.0fa4d8"]]},{"id":"44a35eaa.feede","type":"lwm2m client out","z":"d2ce8276.563c5","name":"","lwm2mClient":"9db4fd03.df67e","x":540,"y":500,"wires":[]},{"id":"a7658a4a.cb0ac8","type":"udp in","z":"d2ce8276.563c5","name":"","iface":"","port":"1203","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":120,"y":500,"wires":[["c2bfae43.2f572"]]},{"id":"c2bfae43.2f572","type":"function","z":"d2ce8276.563c5","name":"","func":"\nvar result=parseInt(msg.payload);\nmsg1=\n{\n \"topic\":\"/420/0/0\",\n \"payload\":result,\n \n}\n\n\nreturn msg1;","outputs":1,"noerr":0,"x":310,"y":500,"wires":[["44a35eaa.feede"]]},{"id":"75cc265b.0fa4d8","type":"http response","z":"d2ce8276.563c5","name":"","statusCode":"","headers":{},"x":770,"y":280,"wires":[]},{"id":"c801b62c.ae9f28","type":"debug","z":"d2ce8276.563c5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":310,"y":400,"wires":[]},{"id":"fb4b035a.2aa67","type":"function","z":"d2ce8276.563c5","name":"","func":"flow.set(\"req\", msg.req);\nflow.set(\"res\", msg.res);\nmsg ={ _msgid: msg._msgid, topic: msg.payload.topic , payload: '' };\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":340,"wires":[["7ef85b8a.eecf74"]]},{"id":"9db4fd03.df67e","type":"lwm2m client","z":"","disabled":false,"clientName":"TMPL-FA-1663","enableDTLS":false,"clientPort":"5683","lifetimeSec":"300","reconnectSec":"30","requestBootstrap":false,"saveProvisionedConfig":false,"useIPv4":true,"serverHost":"leshan.iot-lab.info","serverPort":"5683","redirectLwm2mClientLog":false,"dumpLwm2mMessages":false,"hideSensitiveInfo":true,"propagateInternalEvents":false,"objects":"{\"420\":{\"0\":{\"0\":{\"type\":\"INTEGER\",\"acl\":\"RW\",\"value\":4},\"1\":{\"type\":\"FUNCTION\",\"acl\":\"E\",\"value\":\"\"},\"2\":true}}}"}]