# How to use http in node with several parameters

**URL:** <https://discourse.nodered.org/t/how-to-use-http-in-node-with-several-parameters/35125>\
**Category:** General\
**Created:** [31 October 2020 15:20 UTC](https://discourse.nodered.org/t/how-to-use-http-in-node-with-several-parameters/35125 "2020-10-31T15:20:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrQ](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@MrQ](https://discourse.nodered.org/u/MrQ)\
**Post date:** [31 October 2020 15:20 UTC](https://discourse.nodered.org/t/how-to-use-http-in-node-with-several-parameters/35125/1 "2020-10-31T15:20:53Z")

</div>

Hi everyone,

since I lost all my flows in the docker container I have to rebuilt my home automation.

So far I've used the http in node to control my shelly swichtes.

My react dashboard call urls wich where build by the action to do (Set oder Get), the name of the room (for example kitchen) and the state to set (On or Off). For example [http://192.168.188.70:1880/shelly/Set&Kitchen&On](http://192.168.188.70:1880/shelly/Set&Kitchen&On)

But I can't figure out again how to configure the http in node. With that configuration

```auto
[
    {
        "id": "f65d86d5.e3d478",
        "type": "http in",
        "z": "cc03d791.a8b028",
        "name": "",
        "url": "/shelly/:Action:Light:State",
        "method": "get",
        "upload": false,
        "swaggerDoc": "",
        "x": 260,
        "y": 840,
        "wires": [
            [
                "bca62e3b.f4533",
                "e268532b.d8a52"
            ]
        ]
    }
]

```

the response is

```auto
{
"Action": "S",
"Light": "e",
"State": "t&Kitchen&On"
}

```

while I would expect

```auto
{
"Action": "Set",
"Light": "Kitchen",
"State": "On"
}

```

Can please anybody help how to set _url_ in the configuration of the node?  
Regards,  
Lennart

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [31 October 2020 15:41 UTC](https://discourse.nodered.org/t/how-to-use-http-in-node-with-several-parameters/35125/2 "2020-10-31T15:41:00Z")

</div>

Your url `http://192.168.188.70:1880/shelly/Set&Kitchen&On`  
the in node is set to `"/shelly/:Action:Light:State"`,  
but should be `"shelly/:Action/:Light/:State"`

so your url should be `http://192.168.188.70:1880/shelly/Set/Kitchen/On`

eg.

```auto
[{"id":"299b0982.a981d6","type":"http in","z":"baae6393.f4a898","name":"","url":"/shelly/:Action/:Light/:State","method":"get","upload":false,"swaggerDoc":"","x":760,"y":460,"wires":[["6fca747f.8d8764","f0c4094.b9ff278"]]},{"id":"f0c4094.b9ff278","type":"http response","z":"baae6393.f4a898","name":"","statusCode":"","headers":{},"x":1040,"y":540,"wires":[]},{"id":"6fca747f.8d8764","type":"debug","z":"baae6393.f4a898","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"req.params","targetType":"msg","statusVal":"","statusType":"auto","x":1090,"y":460,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![MrQ](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@MrQ](https://discourse.nodered.org/u/MrQ)\
**Post date:** [31 October 2020 15:54 UTC](https://discourse.nodered.org/t/how-to-use-http-in-node-with-several-parameters/35125/3 "2020-10-31T15:54:08Z")

</div>

thank you so much

that will work for me. So far, I'm using & as separator in my react coding. But I will replace it with / in the fetch function and everything will work fine then 🙂

---

<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:** [14 November 2020 15:54 UTC](https://discourse.nodered.org/t/how-to-use-http-in-node-with-several-parameters/35125/4 "2020-11-14T15:54:11Z")

</div>

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