# Send multiple value in a http-request

**URL:** <https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972>\
**Category:** General\
**Tags:** http-request\
**Created:** [13 October 2022 09:39 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972 "2022-10-13T09:39:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mra2ko](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mra2ko](https://discourse.nodered.org/u/mra2ko)\
**Post date:** [13 October 2022 09:39 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/1 "2022-10-13T09:39:40Z")

</div>

Hi, I need make node with more input value for example temp1,temp2,temp3,temp4 join and send in one http get. I have joined all values to one, but I dont know how to rename each payload to exact name and use in http get url....

`www.aaa.com/index.php?temp1=(here value from temp1)&temp2=(here value from temp2)&temp3=(here value from temp3)&temp4=(here value from temp4)`

Anybody can help me ?  
Thank

---

<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:** [13 October 2022 10:05 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/2 "2022-10-13T10:05:45Z")

</div>

Read the built in help...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50ea50bb4715525d570cd0b40404f52038da74fa.png)

example...

`www.aaa.com/index.php?temp1={{temp1}}&temp2={{temp2}}&temp3={{temp3}}&temp4{{temp4}}`

You message should contain these values e.g.

```auto
msg.temp1 = "i am a query parameter"
msg.temp2 = "i am another query parameter"
msg.temp3 = "something"
msg.temp4 = "something else"
return msg

```

---

<div class="post-metadata">

**Author:** ![mra2ko](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mra2ko](https://discourse.nodered.org/u/mra2ko)\
**Post date:** [13 October 2022 10:42 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/3 "2022-10-13T10:42:59Z")

</div>

Hi Steve,  
Yes, I know this, but i need help with something "before" http request...  
I got the values from mqtt, have 4 mqtt probes with output (TMP\_1) (TMP\_2) (TMP\_3) (TMP\_4) - (need convert name from TMP\_1 to temp1 when send over http get), next use join for one value output and after them ? Maybee is "join" function wrong, I dont know, because I am newbile...  
Thanks

---

<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:** [13 October 2022 11:31 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/4 "2022-10-13T11:31:38Z")

</div>

> [@mra2ko](#):
>
> Maybee is "join" function wrong

> [@mra2ko](#):
>
> I have joined all values to one, but I dont know how to rename each payload to exact name and use in http get url

Which is it?

Maybe you should share a demo flow (select nodes of interest, `CTRL-E` export, paste into reply)

* * *

For the record,

If the values come from separate nodes (down different wires) you need a join node.

Once you have all value inside 1 msg, you can do whatever you need to - to form a URL.

Show us what comes out of your join node too.

---

<div class="post-metadata">

**Author:** ![mra2ko](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mra2ko](https://discourse.nodered.org/u/mra2ko)\
**Post date:** [13 October 2022 11:40 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/5 "2022-10-13T11:40:57Z")

</div>

Output from Join here:  
13. 10. 2022 13:34:26[node: af83a14cbbf0fa7a](  
TMP1 : msg.payload : Object  
object  
TMP1: 63.9  
TMP2: 18.83  
TMP3: 13.6

Export...

```auto
[
    {
        "id": "9f24f1d8b129e742",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "d682318c.36823",
        "type": "debug",
        "z": "9f24f1d8b129e742",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 160,
        "wires": []
    },
    {
        "id": "053709361fcc7da6",
        "type": "http request",
        "z": "9f24f1d8b129e742",
        "name": "",
        "method": "use",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "www.aaa.com/index.php?temp1={{temp1}}&temp2={{temp2}}&temp3={{temp3}}&temp4{{temp4}}",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "senderr": false,
        "x": 830,
        "y": 340,
        "wires": [
            []
        ]
    },
    {
        "id": "c28dc7f04fd295d8",
        "type": "mqtt in",
        "z": "9f24f1d8b129e742",
        "name": "",
        "topic": "TMP1",
        "qos": "2",
        "datatype": "json",
        "broker": "0a627941c1f17ea1",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 290,
        "y": 280,
        "wires": [
            [
                "d682318c.36823",
                "f3bae91a82b961ce"
            ]
        ]
    },
    {
        "id": "425bb611edd1ada5",
        "type": "mqtt in",
        "z": "9f24f1d8b129e742",
        "name": "",
        "topic": "TMP2",
        "qos": "2",
        "datatype": "json",
        "broker": "0a627941c1f17ea1",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 290,
        "y": 340,
        "wires": [
            [
                "8bd630ded2053ae4",
                "f3bae91a82b961ce"
            ]
        ]
    },
    {
        "id": "f3bae91a82b961ce",
        "type": "join",
        "z": "9f24f1d8b129e742",
        "name": "",
        "mode": "custom",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": true,
        "timeout": "10",
        "count": "1",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "num",
        "reduceFixup": "",
        "x": 610,
        "y": 340,
        "wires": [
            [
                "053709361fcc7da6"
            ]
        ]
    },
    {
        "id": "a39b613728c5aa18",
        "type": "mqtt in",
        "z": "9f24f1d8b129e742",
        "name": "",
        "topic": "TMP3",
        "qos": "2",
        "datatype": "json",
        "broker": "0a627941c1f17ea1",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 290,
        "y": 420,
        "wires": [
            [
                "102f3d937eb4f5f3",
                "f3bae91a82b961ce"
            ]
        ]
    },
    {
        "id": "8bd630ded2053ae4",
        "type": "debug",
        "z": "9f24f1d8b129e742",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 220,
        "wires": []
    },
    {
        "id": "102f3d937eb4f5f3",
        "type": "debug",
        "z": "9f24f1d8b129e742",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 260,
        "wires": []
    },
    {
        "id": "0a627941c1f17ea1",
        "type": "mqtt-broker",
        "name": "Local MQTT Server",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "5",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    }
]

```

[MODERATOR NODE: edited flow to make it able to be imported]

---

<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:** [13 October 2022 15:34 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/6 "2022-10-13T15:34:26Z")

</div>

So your values are in `msg.payload.TMP1`, `msg.payload.TMP2` and `msg.payload.TMP3`

Then why not simply use them!

Put `www.aaa.com/index.php?temp1={{payload.TMP1}}&temp2={{payload.TMP2}}&temp3={{payload.TMP3}}` in the `url` field of the HTTP request node!

---

<div class="post-metadata">

**Author:** ![mra2ko](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mra2ko](https://discourse.nodered.org/u/mra2ko)\
**Post date:** [13 October 2022 19:05 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/7 "2022-10-13T19:05:34Z")

</div>

Work, thank !

---

<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:** [27 October 2022 19:06 UTC](https://discourse.nodered.org/t/send-multiple-value-in-a-http-request/68972/8 "2022-10-27T19:06:24Z")

</div>

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