I'm using the HTTP request node to drive a PUT command for an integration, I have to send out Headers and data in the msg.payload. I want a button on the deashboard to trigger this event, if i put the data in the button's msg.payload it looks like it disappears by the time it reaches the PUT http request node.
What is the best way to attach msg.payload JSON data to it?
I tried to simply add msg.payload in the header list, but there is no selection for JSON and I'm sure it is not the right way.
move the payload to another property (say msg.temp), after the button. Then execute the login request. Then move the msg.temp back to msg.payload prior to put request.
In the Debug 11 I see the sessionToken , in the debugt10 I have the msg.payload that I set in the change node. But in debug 12 the sessioToken is not there anymore, and of course the final debug of the flow says "Session token not found"
This is my change node:
Can't help much as all you have shared is one change node. Would be more helpful if you counld share the whole flow, then we could see the var usage. Obviously remove/alter any url or keys you don't want public.
Hi Man, this is working, Thank you. Im still at the bigginging of my jurney with Node-red and understanding what is going on. It was a big help thanks!
Hi,
for some added the full flow as a second code, but I did't realizes it was not posted, propebly I deleted it or never saved the editit version?? @zenofmud 's idea was working, I tred a fep optin but it looks like I always overwrote the msg.payload or the msg.sessionToken.
Thanks guys! Appriciate it. I hope soon I will learn enough to be able to help out others.