Getting funky with http request node?

I am trying to translate the following curl command to a NR http request node. Of course, I could just use an exec node and the curl CLI, but that would be too easy.

curl -H "BOND-Token: AAA" -i http://192.168.1.12/v2/devices/AAA/actions/TurnLightOff -X PUT -d "{}"

The header is pretty straight forward...
image

The URL seems clear?
image

But something is not right, I get ECONNREST as the result?

The AAA is redacted value, since I don't want to publish the 'token' information nor the device name, in both cases just a string value.

Just a quick sanity check.

Have you set the Method to PUT in the request node and provided an empty object, in the form of a payload?

I would also suggest adding another header -> Content-Type set to application/json
By default it will be set to multipart/form-data and this maybe what is happening.

EDIT:
Its the other way around :sweat_smile:
so check the method, and attach an empty object

Yea, the injection is empty topic and empty payload. But I realized payload actually must be '{}' not null. That was the trick the given REST API required.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.