Although I'm getting nowhere fast with the other stuff WRT this node.....
When the node is open:
I'm confused. (What's new?)
So the way I've been using it is the URL is FIXED.
But looking at the docs (part of picture) it is confusing for me.
I change thepayload from Ignore to send as request body......
I'm not sure what that means.
But I'd like to be able to know if I can change the URL depending on what msg.payload it is sent.
The docs don't really say it, but the wording:
Sent as the body of the request.
What does that really mean?
Sorry folks.
Thanks in advance.
You need to understand HTTP APIs to understand that. In basic terms, a GET pretty much does NOT use the payload, whereas a PUT or POST might use the payload.
The help states:
When configured within the node, the URL property can contain mustache-style tags. These allow the url to be constructed using values of the incoming message. For example, if the url is set to example.com/{{{topic}}} , it will have the value of msg.topic automatically inserted. Using {{{...}}} prevents mustache from escaping characters like / & etc.
So you could have a URL of https://something/category/{{{payload}}}
Equally, you could leave it blank and use a change or function node to build msg.url from msg.payload
To set the url of the request, you can pass in msg.url - as long as you leave the url field in the node configuration blank.
Ah!
Yeah. Thanks.
Silly me. I somehow didn't parse that correctly.
Though - of course - changing the URL probably isn't a good idea but it was just a bit confusing.