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

**URL:** https://discourse.nodered.org/t/how-to-convert-working-curl-command-to-nr-http-request-node/100241
**Category:** General
**Created:** [25 January 2026 18:36 UTC](https://discourse.nodered.org/t/how-to-convert-working-curl-command-to-nr-http-request-node/100241 "2026-01-25T18:36:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jibun-no-Kage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jibun-no-kage/32/99316_2.png) [@Jibun-no-Kage](https://discourse.nodered.org/u/Jibun-no-Kage)
#### Post date: [25 January 2026 18:36 UTC](https://discourse.nodered.org/t/how-to-convert-working-curl-command-to-nr-http-request-node/100241/1 "2026-01-25T18:36:58Z")

</div>

The following curl command works...

```auto
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?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a54527a7d2d9467c05b3217cdfe9d4507cda02b8.png)

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.

---

<div class="post-metadata">

### Author: ![Jibun-no-Kage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jibun-no-kage/32/99316_2.png) [@Jibun-no-Kage](https://discourse.nodered.org/u/Jibun-no-Kage)
#### Post date: [25 January 2026 19:12 UTC](https://discourse.nodered.org/t/how-to-convert-working-curl-command-to-nr-http-request-node/100241/2 "2026-01-25T19:12:25Z")

</div>

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...

```auto
msg.payload = "{}"

```

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [8 February 2026 19:12 UTC](https://discourse.nodered.org/t/how-to-convert-working-curl-command-to-nr-http-request-node/100241/3 "2026-02-08T19:12:37Z")

</div>

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