Send multiple value in a http-request

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

Read the built in help...

image

example...

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

You message should contain these values e.g.

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

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

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.

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...

[
    {
        "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]

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!

Work, thank !

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