Advanced REST Client blog
Blog for Advanced Rest Client - a Google Chrome application.

Introduce: Magic Variables

In newest update you will be able to use the Magic Variables. Currently it is two special strings that will be replaced just before sending a request:

${random} - generate random number from 0 to java's Integer.MAX_VALUE
${now} - insert current time (in ms)

You can place it in the URL, in headers list or in payload.

Furthermore, if you like to group generated numbers and use the same generated value in more than one place you can use notation like:

${random:[group_number (int)]}

Each time where particular group occur it will be replaced with the same generated number. See an example:

Use of magic variables
As you can see I use regular ${random} and random with groups (1 and 2). The result is:



I hope you enjoy new feature.
Happy RESTing!