Often it's necessary to get either the body or parameters of the incoming request, to use them in the DSL. Ruuter stores these variables and allows their use through the following keywords:
- query parameters:
incoming.params
- request body:
incoming.body
https://ruuter/scripting/passing-get-parameters?passedVariable=passedValue
first_step:
return: ${incoming.params.passedVariable}
--------------------------------------------
Expected result: "passedValue"
curl https://ruuter/scripting/passing-post-parameters \
-H 'Content-Type: application/json' \
-d '{"project": "Bürokratt", "website": "www.kratid.ee"}'
first_step:
return: ${incoming.body.project} - ${incoming.body.website}
--------------------------------------------
Expected result: "Bürokratt - www.kratid.ee"