Node Red Pass GET Parameters for HTTP Request

It is easy to set GET parameters for HTTP request. You need to use the mustache brackets inside the URL itself.

The Flow Diagram

node red http request flow diagram
node red http request flow diagram

Steps To Set Get Parameters

1) Inject Node

– Payload – can set to anything. In my case I use timestamp

node red inject node
node red inject node

2) Function Node

– Set parameter GET value here
– In my case I use parameter name “path” and “limit”, set as msg.path and msg.limit
– You can use any name for your parameter name but it be the same as in HTTP Request Node

node red function node set get http request parameters
node red function node set get http request parameters

3) HTTP Request Node

– Choose method: GET
– In the URL, use mustache brackets to declare your variable {{{path}}}
– The parameter name must be same as in the Function Node

node red http request node
node red http request node

4) Debug Node

– Use to display the output

node red debug output with GET parameter value
node red debug output with GET parameter value

Notes:

Node Red version used – v0.20.7

Node Red Set Parameters HTTP Request GET – Flow File Example