Hallo,
is it easy possible to get msg.payload from my flows as a http output like this (from my wallbox):
without installing a webserver or similar
greetings
Hallo,
is it easy possible to get msg.payload from my flows as a http output like this (from my wallbox):
without installing a webserver or similar
greetings
Yes, a simple example is here
https://cookbook.nodered.org/http/create-an-http-endpoint
or if you want to make a request here is another example
https://cookbook.nodered.org/http/simple-get-request
I already saw this example, but it doesn't help me
How do I get a msg.payload in it ?
<html>
<head></head>
<body>
<h1>global.SoC</h1>
</body>
</html>
just write "global.SoC"
edit:
got it with the global:
<html>
<head>{{global.SoC}}</head>
</html>
can I get msg.payload without global or flow ?
maybe you can explain what is the difference between:
To use msg.payload just drop the msg. So {{payload}}
That is the output so if you want the template as msg.payload, select msg and type payload
thank you.
the device who should read the http doesnĀ“t except the url/value.
the info says:
Valid values are full url. The requested url must return a pure number. If the return value contains something other than "-" (for infeed) or "0-9", the value is set to zero. The value must be in watts.
IĀ“m not sure if the http out is a string or a number.
firefox says:
or is the problem the port (:1880) in the url
I think the port can not be bypassed => url without :1880 ?
does not matter as all numbers and strings are sent as strings.
You will need to remove the html from the template and just have {{payload}} in the template no other text
thank you again, now it is accepted
last question for today:
the response always has to be empty ?
I don't understand the point of this node.
Not always, some times you need to send headers in the response, or alter the status code, or delete cookies.
The http in node creates a msg.res, which is passed to the response node. This will contain standard response code, headers and other information and the response url.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.