How to convert working curl command to NR http request node?

The following curl command works...

curl -H "BOND-Token: 082b428c38fb7b47" -X PUT -i http://192.168.1.10/v2/devices/67ea44a0/actions/ToggleLight -d "{}"

But I am missing something when I convert this to a NR http request node? Not sure how to represent the empty data -d "{}" specification in the http request node?

I have various GET http request nodes working, so I know the token that the URL is effectively right, per working curl and the given REST API documentation I am referencing.

Figured it out... I realized I needed via msg.payload to send valid JSON string for the 'data' of the PUT command. In this specific case it is just an empty JSON string, so...

msg.payload = "{}"

Since I happen to using a function node to create the URL specification.

2 Likes