I am wondering if it is possible to set and use variables in the body of a request rather than in the url itself, as the documentation has been a bit confusing surrounding that topic. Thank you!
Hey @awalsh1102
You can absolutely use variables in the body of a request, for example:
{
"message":"{{my_variable}}"
}
Is this what you have in mind or are you thinking of something different?
Hi Danny!
Thank you for your reply. I tried using that method to set my variable equal to a value within the body but it did not work. Is there a workaround? Thanks!
That would be how to use a variable in request and not set one.
Setting variables can be done either manually in any of the scopes (Global, Collection, Environment, etc) or done programmatically via either a pre or post request script.
Can you you share how you would like to see that happening and if those methods are not working for you.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.