0

I would like to get parameter on my flow, for example, http://localhost:8000/?param1=12.

If i want to recup param1 in my application, how and where can i do it ?

General Grievance
  • 4,555
  • 31
  • 31
  • 45

1 Answers1

0
  • install httproute component
  • edit route options, add your endpoint e.g. /endpoint/ + check respond automatically
  • add code component and join it with HTTP route
  • in the code you can use:
// now can get a value from query arguments
value.query.param1

// Performs next proccessing
send(0, value);

Or you can use httplistener component but this component captures all requests. httplistener has contain same properties like httproute.

Peter Sirka
  • 748
  • 5
  • 10
  • Hi Peter Thanks for response, i'm in `index.js` file, on line 1764 and this is here who i want to recup the param from my url, do u have an idea ? Thanks – Maxence.sailly Mar 06 '19 at 10:37
  • In which `index.js`? If you want to obtain a param from URL where the Flow designer is running then you need to use `httplistener` component. Flow doesn't know about the designer, designer connects to Flow backend only via WebSocket. – Peter Sirka Mar 07 '19 at 07:33
  • Thanks for answers, i found a method now, thanks anyway – Maxence.sailly Mar 07 '19 at 10:13