How to replace Variable in Bruno #1718
Unanswered
HussmohaCode
asked this question in
Q&A
Replies: 1 comment
-
Hey there, seems like you might be using a JS API found in postman which isn't available in Bruno. The Bruno docs lists all the available API you can use in the script tab. To your question, you can use bru.setEnvVar( [ENV_KEY], [value] ) example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Code in the Script Tab. Below is my code for replacing the Variable
bru.setEnv("Username",bru.variables.replaceIn)('{{$randomCatchPhrase}}'+'{{$randomAbbreviation}}'+'{{$randomInt}}'));
Every time I get undefined for "variables" and "replaceIn" words. What would be the correct code for Variable replacement in the Environment?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions