Body Preview & Random Variables

Response bodies do not have to be hard-coded. Anywhere you would otherwise write a fixed string, you can insert one of Tigrister's random variable tokens — for example {{random.uuid}} or {{random.int}} — and the mock will replace them with fresh values every time it serves a response. The Preview button on the response body editor is the easiest way to see what those tokens turn into.

The Hover Toolbar on the Response Body

When you move the mouse into the response body editor, a small toolbar appears in its top-right corner. Which buttons are shown depends on the body type:

  • Copy: copies the raw body — exactly what you have typed, including any random variable tokens — to the clipboard. Useful when you want to reuse the template elsewhere.
  • Format and Minify (JSON and XML only): pretty-print or compact the body in place. The raw template is rewritten on the spot.
  • Preview: opens the preview modal described in the next card.

The Preview Modal

Clicking Preview opens a modal titled Response Body Preview. Its main area shows a rendered version of the body with every random variable token replaced by a sample value. For a JSON body, the result is also pretty-printed so the structure is easy to read.

  • Read-only: the preview does not let you edit the body. It is only a window into what the body would look like right now.
  • Copy button: the small Copy button in the top-right corner of the preview copies a fresh rendered version to the clipboard — not the same sample you see on screen. Every click generates a new set of values, which is useful when you need several concrete copies without switching tools.
  • Close: press Escape, click the X in the header, or click anywhere on the dark backdrop.

Which Tokens Can I Use?

The set of random variable tokens you can insert in a mock response body is the same set used everywhere else in Tigrister — UUIDs, integers, timestamps, emails, names, and so on. The full list, with examples, lives in the Random Variables chapter earlier in this guide. Anything that works in a regular HTTP request body or path also works in a mock response body.

Random variables are also resolved in the endpoint's path field, which is how the Preview mode of the Method & Path row builds its sample URL. See Method & Path for the path side.