'Get parameter in totalJS Flow?
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 ?
Solution 1:[1]
- install
httproutecomponent - edit route options, add your endpoint e.g.
/endpoint/+ checkrespond automatically - add
codecomponent and join it withHTTP route - in the
codeyou 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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Peter Sirka |
