# HTTP request not working

**URL:** https://discourse.nodered.org/t/http-request-not-working/79639
**Category:** General
**Created:** [7 July 2023 18:53 UTC](https://discourse.nodered.org/t/http-request-not-working/79639 "2023-07-07T18:53:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![network\_potato](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@network\_potato](https://discourse.nodered.org/u/network_potato)
#### Post date: [7 July 2023 18:53 UTC](https://discourse.nodered.org/t/http-request-not-working/79639/1 "2023-07-07T18:53:10Z")

</div>

Hello,

Example flow:

```auto
[
    {
        "id": "7f3738a666b6d04a",
        "type": "inject",
        "z": "dd671a1cf3809c0b",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 500,
        "y": 1360,
        "wires": [
            [
                "5c2cf5690476f240"
            ]
        ]
    },
    {
        "id": "b02330188bc77446",
        "type": "http request",
        "z": "dd671a1cf3809c0b",
        "name": "",
        "method": "POST",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "https://www.pling.as/psk/push.php",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [
            {
                "keyType": "Content-Type",
                "keyValue": "",
                "valueType": "application/json",
                "valueValue": ""
            }
        ],
        "credentials": {},
        "x": 790,
        "y": 1360,
        "wires": [
            [
                "a3b0130494d0225c"
            ]
        ]
    },
    {
        "id": "5c2cf5690476f240",
        "type": "function",
        "z": "dd671a1cf3809c0b",
        "name": "",
        "func": "msg.payload = \n\n{\n \"serviceid\": \"<removed>\",\n \"password\": \"<removed>\",\n \"fromid\": \"<removed>\",\n \"phoneno\": \"<removed>\",\n \"txt\": \"This is a test.\",\n \"unicode\": false\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 640,
        "y": 1360,
        "wires": [
            [
                "b02330188bc77446"
            ]
        ]
    },
    {
        "id": "a3b0130494d0225c",
        "type": "debug",
        "z": "dd671a1cf3809c0b",
        "name": "debug 56",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 940,
        "y": 1360,
        "wires": []
    }
]

```

This HTTP request does not work (nothing happens). It is supposed to send me a text message via an SMS API.

However, if I try using [reqbin.com](http://reqbin.com), it works perfectly.

And I get the SMS.

Why will this not work via Node-RED?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 July 2023 18:56 UTC](https://discourse.nodered.org/t/http-request-not-working/79639/2 "2023-07-07T18:56:55Z")

</div>

Add `return msg` to the end of your function

---

<div class="post-metadata">

### Author: ![network\_potato](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@network\_potato](https://discourse.nodered.org/u/network_potato)
#### Post date: [7 July 2023 19:07 UTC](https://discourse.nodered.org/t/http-request-not-working/79639/3 "2023-07-07T19:07:53Z")

</div>

LOL how did I not see that. Thank you 😂

---

<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: [21 July 2023 19:08 UTC](https://discourse.nodered.org/t/http-request-not-working/79639/4 "2023-07-21T19:08:28Z")

</div>

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