Http request with payload

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

Thank you! Have tried but I don't succeed. What am I doing wrong.

What is the value of msg.payload when you pass it to this node?

It is 100 or 0. Have also removed 1 after = in my example

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.

This is what it look like in a web browser. This sets the device to on

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