# HTTP request with & Node js version

**URL:** <https://discourse.nodered.org/t/http-request-with-node-js-version/99055>\
**Category:** General\
**Created:** [16 September 2025 01:42 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055 "2025-09-16T01:42:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [16 September 2025 01:42 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/1 "2025-09-16T01:42:32Z")

</div>

Hi all

I posted recently regarding an issue with the HTTP request node not working with a specific url as in the following flow.

```auto
[{"id":"e529806637c41745","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"0aecaff079a7d222","type":"inject","z":"e529806637c41745","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":200,"wires":[["a912609c14464323"]]},{"id":"7c34b31725eb266f","type":"debug","z":"e529806637c41745","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":200,"wires":[]},{"id":"a912609c14464323","type":"http request","z":"e529806637c41745","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"hc-ping.com/8ed9d26b-d62c-4fd6-999b-7a07ea0b5f8a","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"basic","senderr":false,"headers":[],"x":330,"y":200,"wires":[["7c34b31725eb266f"]]}]

```

I tried to resolve this with the help of others with no luck then noticed a post with a similar issue with a different url

Remedy was to downgrade node js (in this case to 18.20.8) all works OK, tried version 20.0.0 and issue returns.

Not sure if issue is with nodered, node js or the specific url’s and if I should be using a later version of node js with nodered 4 to avoid other issues.

Advice would be appreciated

---

<div class="post-metadata">

**Author:** ![leftymuller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leftymuller/32/102326_2.png) [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Post date:** [16 September 2025 02:31 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/2 "2025-09-16T02:31:47Z")

</div>

Hello Wally,

Change your URL to [http://hc-ping.com/8ed9d26b-d62c-4fd6-999b-7a07ea0b5f8a](http://hc-ping.com/8ed9d26b-d62c-4fd6-999b-7a07ea0b5f8a)

you are missing the http://

Seems to work after you do that 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/b/eb9e6bedb624a4da68f03588220927e65f00d75b.png)

---

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [16 September 2025 07:31 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/3 "2025-09-16T07:31:19Z")

</div>

Hi

With node js 18 i can use http, https or no prefix and they all work, with node js 20 they all fail.

What version of node red are you using ?

Thanks

And which version of node js

---

<div class="post-metadata">

**Author:** ![leftymuller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leftymuller/32/102326_2.png) [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Post date:** [16 September 2025 10:55 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/4 "2025-09-16T10:55:22Z")

</div>

Hi Wally,

Node-red 4.0.3

Nodejs 20.19.5

---

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [16 September 2025 18:50 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/5 "2025-09-16T18:50:35Z")

</div>

Hi  
Thanks for the info.

That's odd. this is a pi 3 clean install from a week ago via the script. No other flows or nodes installed. Never works with [healthchecks.io](http://healthchecks.io) api & http node until I change to earlier nodejs version. Always works with exec node & curl. Someone else with same issue;

([Browser request works but exact same node red request fails](https://discourse.nodered.org/t/browser-request-works-but-exact-same-node-red-request-fails/96415))

---

<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:** [16 September 2025 20:01 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/7 "2025-09-16T20:01:33Z")

</div>

Can you post a failing flow where you specify http?

---

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [16 September 2025 23:46 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/8 "2025-09-16T23:46:07Z")

</div>

nodejs 18.20.8

```auto
"_msgid":"44f241f22ef93373","statusCode":200,"headers":{"server":"nginx","date":"Tue, 16 Sep 2025 23:31:18 GMT","content-type":"text/plain; charset=utf-8","content-length":"2","access-control-allow-origin":"*","ping-body-limit":"100000","connection":"close","x-node-red-request-node":"1dc6ebc7"},"responseUrl":"https://hc-ping.com/51300254-381b-44ee-9c4e-29e01c380b3d","payload":"OK","redirectList":[],"retry":0}

```

nodejs 20.0.0

```auto
{" __enc__":true,"type":"error","data":{"name":"RequestError","message":"","code":"ENETUNREACH","stack":"RequestError\n at ClientRequest.<anonymous> (file:///usr/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:790:107)\n at Object.onceWrapper (node:events:626:26)\n at ClientRequest.emit (node:events:523:35)\n at TLSSocket.socketErrorListener (node:_http_client:495:9)\n at TLSSocket.emit (node:events:511:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError\n at internalConnectMultiple (node:net:1102:18)\n at internalConnectMultiple (node:net:1160:5)\n at internalConnectMultiple (node:net:1160:5)\n at internalConnectMultiple (node:net:1160:5)\n at internalConnectMultiple (node:net:1160:5)\n at Timeout.internalConnectMultipleTimeout (node:net:1637:3)\n at listOnTimeout (node:internal/timers:575:11)\n at process.processTimers (node:internal/timers:514:7)"}}

```

```auto
[{"id":"e529806637c41745","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"0aecaff079a7d222","type":"inject","z":"e529806637c41745","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":200,"wires":[["a912609c14464323"]]},{"id":"7c34b31725eb266f","type":"debug","z":"e529806637c41745","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":200,"wires":[]},{"id":"a912609c14464323","type":"http request","z":"e529806637c41745","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://hc-ping.com/51300254-381b-44ee-9c4e-29e01c380b3d","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"basic","senderr":false,"headers":[],"x":330,"y":200,"wires":[["7c34b31725eb266f"]]}]

```

I did try extending the timeout but no effect. ping returns average 321  
thanks

---

<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:** [17 September 2025 12:40 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/9 "2025-09-17T12:40:05Z")

</div>

Well your flow is ok for me on nodejs 22 with node red 4.1.0

What version of node-red are you using?

---

<div class="post-metadata">

**Author:** ![Wally](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Wally](https://discourse.nodered.org/u/Wally)\
**Post date:** [18 September 2025 08:17 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/10 "2025-09-18T08:17:17Z")

</div>

Hi Colin

node red 4.1.0 and I installed nodejs 22 but with the same result. The only difference I can see seems to be location I am in NZ and I assume you are in the UK/Europe, I changed from a rural broadband cellular connection to Starlink and it returns OK 200. Maybe timezone/server issue ? Easy to work around with exec/curl so will not spend anymore time on it but found it quite intriguing. If there is anyone in NZ using a Spark or Vodafone etc. with a cellular broadband connection could they try the flow !  
Great forum, thanks for the support.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [18 September 2025 09:11 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/11 "2025-09-18T09:11:24Z")

</div>

I'm not in NZ but I do use cellular broadband and the flow returns statusCode 200.

~ $ node-red --version  
Node-RED v4.1.0  
Node.js v22.17.0  
Linux 6.12.25+rpt-rpi-v8 arm64 LE

---

<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:** [17 December 2025 09:12 UTC](https://discourse.nodered.org/t/http-request-with-node-js-version/99055/12 "2025-12-17T09:12:11Z")

</div>

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