Skip to content

How should I convert {{$guid}} from postman #1073

Answered by martinsefcik
natt-han asked this question in Q&A
Discussion options

You must be logged in to vote

For example you can use this code in pre-request script

bru.setVar('uuid', require("uuid").v4());

to set collection variable uuid with uuid value.

then you can use it e.g. in request body or url like this:

{{uuid}}

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.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by natt-han
Comment options

You must be logged in to vote
4 replies
@nhomble
Comment options

@Its-treason
Comment options

@so-jelly
Comment options

@Its-treason
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants