Open adrian2096 opened 9 months ago
I never tried it, but I think an IIFE might do the trick:
dataSet: |
(function() {
var output = $runAction("org.getopentest.actions.HttpRequest", {
url: url,
verb: GET
});
return output.body;
})();
Or a shorter syntax:
dataSet: |
$runAction("org.getopentest.actions.HttpRequest", {
url: url,
verb: GET
}).body;
Let me know if it worked.
It worked, thanks for the help!
Hello, I am using the solution from this issue and I am seeing that the call is being repeated in each iteration, I was expecting that the call to the dataSet would be made only once, is it possible to change this behavior?
Hi, I tried to use the JSON response of an Api in the dataSet but I get the message "Caused by: jdk.nashorn.internal.runtime.ParserException::7:0 Invalid return statement return $output.body;"
dataSet: | $runAction("org.getopentest.actions.HttpRequest", { url: url, verb: GET }); return $output.body;
Would there be a way to use the API response in the dataSet?