Hi,
I am trying to send an JSON body to my HTTP request. But I need to give a percentage in the body, that's the reason why I use the template node.
When I deploy I get an error "Unexpected end of JSON input", does anyone know what the problem is?
Hi,
I am trying to send an JSON body to my HTTP request. But I need to give a percentage in the body, that's the reason why I use the template node.
When I deploy I get an error "Unexpected end of JSON input", does anyone know what the problem is?
You are missing the closing } }
at the end of the template.
You should also be setting msg.payload
not msg.req.body
if you want the HTTP Request node to send it.
I suggest you turn off the "parsed JSON object" option, then pass the output to a Debug node so you can see the actual text being generated. That'll make it much easier to spot the error.
I think the msg.payload.percentage
should be payload.percentage
when using template node.
[edit] and </> format need to be mustache
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.