# EXEC works but I can't figure out how to convert it to use an http-request

**URL:** <https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111>\
**Category:** General\
**Tags:** http-request\
**Created:** [29 December 2023 11:35 UTC](https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111 "2023-12-29T11:35:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 December 2023 11:35 UTC](https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111/1 "2023-12-29T11:35:07Z")

</div>

MacOs Ventura 13.6  
Node-red 3.1.1  
Node.js v18.12.1

RPI 2 model B  
OS: Bullseye  
TickTockDB v0.12.1 (replacing Influx)

In NR (running on the Mac) I have an `exec` node that successfully stores data in the DB but I'm trying to convert it to use the `http-request` node and keep having problems.

This is what is sent to the `exec` node and it works:

```auto
{
  "_msgid": "5dd3fbca304156f1",
  "payload": "curl -v -POST 'http://192.168.1.192:6182/api/put' -d 'put weather.t 1703845893 11.1 location=Hill_Street_Basement'",
}

```

and this is what's sent to the `http-request` node

```auto
{
  "_msgid": "69f9c4717e986b70",
  "url": "http://192.168.1.192:6182/api/put",
  "post": " -d 'put weather.t 1603845050 95.7 location=Hill_Street_Basement'",
  "payload": " -d 'put weather.t 1603845050 95.7 location=Hill_Street_Basement'"
}

```

which is configured like this:

 ![Screenshot 2023-12-29 at 6.33.33 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/001b45ab31d57672f9907f06596f9cade54e1b22.jpeg)

Suggestions??

- Once I get this working I will be writing-up and posting my installation procedure and my flow accessing it.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [29 December 2023 11:48 UTC](https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111/2 "2023-12-29T11:48:38Z")

</div>

Normally like this:

```json
{
  "url": "http://192.168.1.192:6182/api/put",
  "payload": "put weather.t 1603845050 95.7 location=Hill_Street_Basement"
}

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 December 2023 12:01 UTC](https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111/3 "2023-12-29T12:01:17Z")

</div>

Thank You! You have made my day!

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [29 December 2023 12:03 UTC](https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111/4 "2023-12-29T12:03:13Z")

</div>

☺ Thanks, you're welcome 😘

---

<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:** [12 January 2024 12:03 UTC](https://discourse.nodered.org/t/exec-works-but-i-cant-figure-out-how-to-convert-it-to-use-an-http-request/84111/5 "2024-01-12T12:03:50Z")

</div>

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