# Httprequest node - help

**URL:** <https://discourse.nodered.org/t/httprequest-node-help/97155>\
**Category:** General\
**Created:** [20 May 2025 06:14 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155 "2025-05-20T06:14:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 06:14 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/1 "2025-05-20T06:14:52Z")

</div>

Folks, a while back other (smarter) people wrote a quick bit of code for me that uses the `httprequest` node.

I'm wanting to use it again in a similar way but am getting nowhere - fast.

Every time I force a request, I get errors back.

Example flow:

```auto
[{"id":"89f681ae64bd6135","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":3350,"y":180,"wires":[["dcd80a56f41caa81"]]},{"id":"dcd80a56f41caa81","type":"http request","z":"65c9b63cb09879a0","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://discourse.nodered.org/","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Accept","keyValue":"","valueType":"text/plain","valueValue":""},{"keyType":"User-Agent","keyValue":"","valueType":"other","valueValue":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"}],"x":3520,"y":180,"wires":[["3af232784383f3b8"]]},{"id":"3af232784383f3b8","type":"debug","z":"65c9b63cb09879a0","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":3680,"y":180,"wires":[]}]

```

I get back:

```auto
RequestError: The "listener" argument must be of type function. Received an instance of Object

```

and

```auto
{"_msgid":"fccdf90acf47169e","payload":"RequestError: The \"listener\" argument must be of type function. Received an instance of Object : https://discourse.nodered.org/","topic":"","statusCode":"ERR_INVALID_ARG_TYPE"}

```

Sorry, but I'm stuck.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 08:14 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/2 "2025-05-20T08:14:51Z")

</div>

A quick google search for the error led me to [ERR\_INVALID\_ARG\_TYPE on http request node](https://discourse.nodered.org/t/err-invalid-arg-type-on-http-request-node/92441)

Are all your nodes up to date? Check in Manage Palette.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 08:17 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/3 "2025-05-20T08:17:17Z")

</div>

NR 4.0.9  
httprequest 0.1.14

No update showing for that node.

# HANG ON!

This is weird.

What's going on here?

 ![Screenshot from 2025-05-20 18-23-07](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fcb14ddc3094c3c0fe4359d5f0d1eb4b7254443c.png)

Other machines don't have that second entry.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 08:25 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/4 "2025-05-20T08:25:44Z")

</div>

You have installed a contrib node for http request. You don't need that, uninstall it and use the core one. No doubt there is a conflict between it and the core one.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 08:26 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/5 "2025-05-20T08:26:18Z")

</div>

Hang on while I restart NR and I'll post what happens then.

# DONE

Alas, no change. Exactly the same.

Browser refreshed.....

Hang on... I'll try in a private window.  
(Sorry)

Private window.

Same result.

 ![Screenshot from 2025-05-20 18-28-54](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/217db171d704b93fc1c62765b1722e1e9acbd9d4.png)

 ![Screenshot from 2025-05-20 18-30-24](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/3/63b30abd63bdaf5a8aeb40b190742d4212ded185.png)

Acting on what is in the other thread:

```auto
npm list agent-base
node-red-project@0.0.1 /home/me/.node-red
├─┬ node-red-contrib-speed-test@0.1.2
│ └─┬ speedtest-net@1.6.2
│ ├─┬ http-proxy-agent@2.1.0
│ │ └── agent-base@4.3.0
│ └─┬ https-proxy-agent@3.0.1
│ └── agent-base@4.3.0
└─┬ node-red-contrib-tts-ultimate@2.0.5
  ├─┬ @google-cloud/text-to-speech@4.2.2
  │ └─┬ google-gax@3.6.1
  │ └─┬ google-auth-library@8.9.0
  │ └─┬ gaxios@5.1.3
  │ └─┬ https-proxy-agent@5.0.1
  │ └── agent-base@6.0.2 deduped
  └─┬ microsoft-cognitiveservices-speech-sdk@1.29.0
    ├── agent-base@6.0.2
    └─┬ https-proxy-agent@4.0.0
      └── agent-base@5.1.1

```

Helpful?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 08:41 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/6 "2025-05-20T08:41:05Z")

</div>

> [@Trying\_to\_learn](#):
>
> ```auto
> ├─┬ node-red-contrib-speed-test@0.1.2
> │ └─┬ speedtest-net@1.6.2
> │ ├─┬ http-proxy-agent@2.1.0
> │ │ └── agent-base@4.3.0
> 
> ```

As you can see, agent-base for node-red-contrib-speed-test is less than version 5 so is probably the problem. That node has not been updated in nearly 9 years so it is not surprising it is pulling in junk.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 08:42 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/7 "2025-05-20T08:42:21Z")

</div>

So - sorry - the obvious question is HOW do I update it?

I only recently updated from NR 3.x to 4.x

🤷

(Re-reading the post)

Ok, so that node is _KILLING_ the whole thing?

😕

So what happens if I want both installed at the same time?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 08:47 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/8 "2025-05-20T08:47:28Z")

</div>

> [@Trying\_to\_learn](#):
>
> So what happens if I want both installed at the same time?

You can't, the problem is in node-red-contrib-speed-test. It is pulling in an ancient version of agent base. You could potentially fork the node's source and try and fix it yourself, but the speed test node might not be compatible with a later version of agent base.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 08:49 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/9 "2025-05-20T08:49:31Z")

</div>

# BIG UPDATE!

Ok, I'm posting for THIS machine. And fair enough.

Just to test myself and my sanity, I went to a RasPi. (Not the best idea as this is POWERFUL, the RasPi is an old 3B+)

The script posted works on the RasPi.

# AND

That machine also has `speedtest` installed on it.

So something else is happening behind the scenes.

But thanks for the help.  
(No offence meant either)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 08:55 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/10 "2025-05-20T08:55:16Z")

</div>

Working machine specs:

```auto
Raspberry Pi 2 Model B Rev 1.1

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

```

NR 3.0.2

```auto
pi@BedPi:~/.node-red $ npm list agent-base
node-red-project@0.0.1 /home/pi/.node-red
└── (empty)

pi@BedPi:~/.node-red $ 

```

😕

```auto
node-red-contrib-speedtest
1.1.0

```

## So is it NR v4.x that is where it all falls apart?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 08:59 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/11 "2025-05-20T08:59:26Z")

</div>

That is a different speed test node.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 09:00 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/12 "2025-05-20T09:00:48Z")

</div>

Ok, sorry....

I got rid of the _wrong_ one. I hope.

What I've done ITMT:

I got it working on the Pi.

EXPORTED it, IMPORTED it to THIS machine - bigger, faster, etc... But NR v 4.x

No conflicts.

Throws an error. (But didn't on the Pi)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 09:19 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/13 "2025-05-20T09:19:40Z")

</div>

> [@Trying\_to\_learn](#):
>
> Throws an error.

'An' error or the same error?

If the same one what does `npm list agent-base` show now?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 09:22 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/14 "2025-05-20T09:22:41Z")

</div>

(Sorry Colin.... Just lost THIS MACHINE's entire NR flow/stuff.)

HUGE DAMAGE CONTROL

(Found back up. Lost 2 months of work)

On the Pi the posted flow works.

On THIS machine it doesn't.

Same flow, same nodes..... So would/could it be a NR V3 to V4 be a problem?

When run on this machine I get the error/s as posted.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 09:23 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/15 "2025-05-20T09:23:20Z")

</div>

> [@Colin](#):
>
> what does `npm list agent-base` show now?

You didn't answer the question

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 09:25 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/16 "2025-05-20T09:25:13Z")

</div>

(Sorry... Hang on)

This machine:

```auto
me@me-desktop:~/.node-red$ npm list agent-base
node-red-project@0.0.1 /home/me/.node-red
└─┬ node-red-contrib-tts-ultimate@2.0.5
  ├─┬ @google-cloud/text-to-speech@4.2.2
  │ └─┬ google-gax@3.6.1
  │ └─┬ google-auth-library@8.9.0
  │ └─┬ gaxios@5.1.3
  │ └─┬ https-proxy-agent@5.0.1
  │ └── agent-base@6.0.2 deduped
  └─┬ microsoft-cognitiveservices-speech-sdk@1.29.0
    ├── agent-base@6.0.2
    └─┬ https-proxy-agent@4.0.0
      └── agent-base@5.1.1

```

I'll have to rebuild/write the flow to be sure it is _STILL_ failing.  
(Again, hang on)

Torn between posting or getting the results then posting.

# UPDATE

Ok, it is now working.  
(Of course)

So - thinking about what just happened - Something I installed in the last 2/3 months messed it.

AFAIK, that is only the new dashboard.

Thoughts?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 09:34 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/17 "2025-05-20T09:34:13Z")

</div>

> [@Trying\_to\_learn](#):
>
> Something I installed in the last 2/3 months messed it.

It was the speed-test node.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 09:34 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/18 "2025-05-20T09:34:54Z")

</div>

So _out of the box_ there is a `speed-test` node in NR?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 May 2025 09:51 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/19 "2025-05-20T09:51:22Z")

</div>

No. I meant the error was caused by node-red-contrib-speed-test. The one on the working system is node-red-contrib-speedtest.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 May 2025 10:04 UTC](https://discourse.nodered.org/t/httprequest-node-help/97155/20 "2025-05-20T10:04:25Z")

</div>

I'm really confused then.

☹

😢

I now have this node installed:  
`node-red-contrib-speedtest` (version 1.1.0)  
I have DB-2 installed and things are working.

I now have `http request` as per the first post. It now works.  
(This machine)

Sorry... I'm not understanding what's going on.

I am prepared to just accept it and move on. But the _cat in me_ is kinda curious. 😉

Oh the other command: (npm list agent-base)

```auto
me@me-desktop:~/.node-red$ npm list agent-base
node-red-project@0.0.1 /home/me/.node-red
└─┬ node-red-contrib-tts-ultimate@2.0.5
  ├─┬ @google-cloud/text-to-speech@4.2.2
  │ └─┬ google-gax@3.6.1
  │ └─┬ google-auth-library@8.9.0
  │ └─┬ gaxios@5.1.3
  │ └─┬ https-proxy-agent@5.0.1
  │ └── agent-base@6.0.2 deduped
  └─┬ microsoft-cognitiveservices-speech-sdk@1.29.0
    ├── agent-base@6.0.2
    └─┬ https-proxy-agent@4.0.0
      └── agent-base@5.1.1

```

Yes, I see the `speed-test` entry is not listed.  
I don't understand how that part works.

[Next page](https://discourse.nodered.org/t/httprequest-node-help/97155.md?page=2)
