0 of 1 steps0%
1
Surprise Destination
Feeling adventurous? Add a pre-request script that picks a random country every time you hit Send.
- Open Get Country and select the Scripts tab.
- Click Pre-request and add:
const destinations = ["Bangladesh", "Japan", "Brazil", "Kenya", "Norway", "Peru"];
const pick = destinations[Math.floor(Math.random() * destinations.length)];
pm.collectionVariables.set("country", pick);
console.log(`Today's destination: ${pick}`);- Save, then Send a few times and watch the response — and your visualization — change. Since your
nameparameter already uses{{country}}, no other edits are needed.