# HTTP Request against HTTP Server not working

**URL:** https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811
**Category:** General
**Created:** [30 May 2023 09:59 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811 "2023-05-30T09:59:05Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Philipp83](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Philipp83](https://discourse.nodered.org/u/Philipp83)
#### Post date: [30 May 2023 09:59 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/1 "2023-05-30T09:59:05Z")

</div>

I didn't get the HTTP request node to make a simple get request with no authentication or anything special.  
The following flow makes a get call to "[http://captive.apple.com/](http://captive.apple.com/)", a simple HTTP test site from Apple.  
I tried it for several hours now with different headers and settings.  
I also used the same headers as postman (no problem within postman) does, but no success.

Hope someone has an idea.

Here is the example flow:

```auto
[
    {
        "id": "80668f010bfcf02e",
        "type": "tab",
        "label": "test",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "e5dbbed115bbe75d",
        "type": "inject",
        "z": "80668f010bfcf02e",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 290,
        "y": 380,
        "wires": [
            [
                "afecbbee2ece7590"
            ]
        ]
    },
    {
        "id": "3cf81ad95bfda998",
        "type": "debug",
        "z": "80668f010bfcf02e",
        "name": "HTTP Only Site",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 720,
        "y": 380,
        "wires": []
    },
    {
        "id": "afecbbee2ece7590",
        "type": "http request",
        "z": "80668f010bfcf02e",
        "name": "HTTP Only Site",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "http://captive.apple.com/",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 500,
        "y": 380,
        "wires": [
            [
                "3cf81ad95bfda998"
            ]
        ]
    }
]

```

---

<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: [30 May 2023 11:09 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/2 "2023-05-30T11:09:42Z")

</div>

your flow works fine for me:

 ![Screenshot 2023-05-30 at 7.08.43 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e3f3030d1e83096cdf551481527457b3b7c979d3.png)

---

<div class="post-metadata">

### Author: ![Philipp83](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Philipp83](https://discourse.nodered.org/u/Philipp83)
#### Post date: [30 May 2023 11:25 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/3 "2023-05-30T11:25:39Z")

</div>

Could this be a proxy problem? I'm behind a proxy from my employer.

---

<div class="post-metadata">

### Author: ![wooferguy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wooferguy/32/75559_2.png) [@wooferguy](https://discourse.nodered.org/u/wooferguy)
#### Post date: [30 May 2023 12:16 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/4 "2023-05-30T12:16:11Z")

</div>

Maybe a firewall problem. Is Node-red installed in the same environment as Postman, or does it exist somewhere different in your employer's network?

---

<div class="post-metadata">

### Author: ![Philipp83](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Philipp83](https://discourse.nodered.org/u/Philipp83)
#### Post date: [30 May 2023 12:19 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/5 "2023-05-30T12:19:34Z")

</div>

It's both installed locally on my machine.  
I can execute the proposed GET Powershell command from postman without any problem...  
very strange...

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [30 May 2023 15:02 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/6 "2023-05-30T15:02:23Z")

</div>

What is the response or error coming from the http node.

---

<div class="post-metadata">

### Author: ![Philipp83](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Philipp83](https://discourse.nodered.org/u/Philipp83)
#### Post date: [31 May 2023 06:19 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/7 "2023-05-31T06:19:33Z")

</div>

The return value is:

```auto
{"_msgid":"c7571b75f15e27e8","payload":"RequestError: Bad response: 403 : http://captive.apple.com/","statusCode":"ERR_GOT_REQUEST_ERROR"}

```

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [31 May 2023 08:47 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/8 "2023-05-31T08:47:16Z")

</div>

Can you do a curl on the commandline on the same host ?

```auto
curl -kvvv "http://captive.apple.com/"

```

You mentioned that you are sitting behind a proxy, did you try to configure the proxy option in the http request node ?

---

<div class="post-metadata">

### Author: ![Philipp83](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Philipp83](https://discourse.nodered.org/u/Philipp83)
#### Post date: [31 May 2023 09:48 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/9 "2023-05-31T09:48:24Z")

</div>

The result of the curl command:

```auto
C:\Users\XXXXX>curl -kvvv "http://captive.apple.com/"
* Trying 17.253.57.204:80...
* connect to 17.253.57.204 port 80 failed: Timed out
* Trying 17.253.57.207:80...
* connect to 17.253.57.207 port 80 failed: Timed out
* Failed to connect to captive.apple.com port 80 after 43109 ms: Couldn't connect to server
* Closing connection 0
curl: (28) Failed to connect to captive.apple.com port 80 after 43109 ms: Couldn't connect to server

```

I also tried to configure the proxy in both, the node red itself & the http request node.  
The proxy configuration seems valid, because I am able to download and install plugins.  
But I got the same error message for my http request:

```auto
{"_msgid":"7e7928fa85ed7190","payload":"RequestError: Bad response: 403 : http://captive.apple.com/","statusCode":"ERR_GOT_REQUEST_ERROR"}

```

It's curious. All applications go through the same proxy. Browser works, Postman works, Powershell works, Curl form CMD doesnt work...

Powershell test, I use:

```auto
(Invoke-WebRequest -UseBasicParsing -Uri 'http://captive.apple.com').Content

```

---

<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: [30 July 2023 09:48 UTC](https://discourse.nodered.org/t/http-request-against-http-server-not-working/78811/10 "2023-07-30T09:48:54Z")

</div>

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