I have a Javascript function in JSR223 Sampler and I would like to call this function in my HTTP Request sampler. Any idea how to call the function?
Example:
I know I can do something like this and use the "total" variable from my HTTP Request Sampler.
var total;
function sum(a, b){
return a+b;
};
vars.put("total", sum(2,4));
But is there a way to call the function sum(a,b) directly from HTTP Request sampler? If not, is there any other way to do this? A sample example will really help me a lot.