Your progress is only saved in this browser. to protect it and pick up on any device.

Connect a Postman API key to check your work

You do each step in Postman, then LiftOff uses your key to look at your workspace and confirm it's done. Connect once and it works for every module. Your key is saved in this browser and is only used to check your work in Postman.

0 of 1 steps0%
1

Surprise Destination

Feeling adventurous? Add a pre-request script that picks a random country every time you hit Send.

  1. Open Get Country and select the Scripts tab.
  2. Click Pre-request and add:
script.js
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}`);

The Get Country request's Pre-request script tab with a script that picks a random destination and stores it in the country variable

  1. Save, then Send a few times and watch the response — and your visualization — change. Since your name parameter already uses {{country}}, no other edits are needed.