Hi. Is it possible to use msg payload in http url. for example
192.168.*********/ref=79&value=(msg.payload) I want this result value=1
/Niclas
Hi. Is it possible to use msg payload in http url. for example
192.168.*********/ref=79&value=(msg.payload) I want this result value=1
/Niclas
Hi - yes you can. This recipe shows you how: https://cookbook.nodered.org/http/set-query-string
What is the value of msg.payload
when you pass it to this node?
So the url you have will contain &value=100&format=json
The response you are getting back from the request tells you the problem: "Error, data is not in json format". Sure enough, you have format set to 'json' but 'value' is not set to a JSON value, just a raw number.
You'll have to refer to the documentation of whatever API you're using to get the format right.
And does it have format=json
in the url when you access it in the browser? I don't see it in the screenshot.
Solved it. Was a big miss from me. It was not post, Change it to get and it worked.
Thank you for your help
Best regards Niclas