Use environment variable in mock examples

Alexandre PERRACHON
Wed, 03 Jun 2020 09:00:35 +0000
Help Hub

Hi there

I’m trying to reuse my URL parameters inside my mock examples.

For example:

/mock?param=ABC
would ideally reply

{
    "param" = "ABC"
}

/mock?param=BCD
would reply

{
    "param" = "BCD"
}

etc

In my example I use the env var “depots” and I set it in 2 different places (because I don’t which place is best, to be honest), but it always replies "{{depots}}" as you can see below.

Thank you!
Alexandre

6 posts - 3 participants