In a pre-request script I want to set a variable to use then in my request.
Let's say my pre-request script looks like this:
var token = "x"
variables.set("token", token);
And if I want to use the variable {{token}} in the request itself, I am getting error:
Request failed to set 'body' — Variable 'token' was not defined