How should I convert {{$guid}} from postman #1073
-
Hello, I'm migrating my collection from postman which using {{$guid}} in request boby. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
For example you can use this code in pre-request script bru.setVar('uuid', require("uuid").v4()); to set collection variable then you can use it e.g. in request body or url like this:
Currently I guess there is no simpler way to achieve that, but as far I know there are plans to add this predefined variables like in Postman. |
Beta Was this translation helpful? Give feedback.
-
We will soon support As @martinsefcik wrote #1073 (comment), you can do it at a request level. If you want to have this written one time and have it applied to any requests, please update the pre request script in the collection settings. |
Beta Was this translation helpful? Give feedback.
For example you can use this code in pre-request script
to set collection variable
uuid
with uuid value.then you can use it e.g. in request body or url like this:
Currently I guess there is no simpler way to achieve that, but as far I know there are plans to add this predefined variables like in Postman.