Use response from server in HTTP request

Hello all,

I'm new to node red, but I've been playing with it for hours now.
I want to use the response I get after a post request from the server in te debug messages, but I am not sure how to do it.

Is there a way to use the response so I can handled it different ways? I tried using a HTTP in, passing thorugh a JSON node (the response is in Json), and the a HTTP response, but it does not work and I'm kind of lost.


Ok, I understand now...I can take whatever response I have from the request and de debug node is only to visualize the result in the panel.

So, now I take the response and want to send it back to a PLC, but it says the value is above the permitted you can see, I do not have more than around 100 characteres, any Idea why is it giving me such error?


you dont have a value property in your payload.
use a change node to or function node to take the property you want written to PLC and put it in payload or payload.value (and i would expect you need to convert it from a string to a number. There are 2 javascript functions to help with that : parseInt and Number )

hint: read the PLC nodes built in help

hint2: use the "copy path" button on debug message to get the part of interest.

There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.


final hint...

I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Thanks, Steve.
I kind of solved, but it's true that if I want to do more complicated stuffs I need to follow all the recommendations you are telling me.
Thanks again!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.