HandbookV the OfficinaEnvironments in an HTTP client
Vthe Officina, Use the toolsEnvironments in an HTTP client
In plain words
An environment in an HTTP client is a set of variables, such as the base address and a token, that lets the same requests run against local, staging or production.
Where you see it
A dropdown near the top of the client, set to something like Local or Production. Requests say {{baseUrl}}/api/projects, and switching the dropdown swaps in http://localhost:3000 or your live address.
What goes wrong
- Typing the address into every request
Fifty requests with http://localhost:3000 written out need fifty edits for staging. Put it in a baseUrl variable once.
- Sending to production by mistake
The dropdown still says Production from yesterday, and your test DELETE removes a real customer's project. Check the environment before any request that changes data.
- Committing real tokens with the collection
Clients that save collections as files, like Bruno, can carry tokens into Git. Mark tokens as secret variables so their values stay on your machine.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYou tested Harbor's Delete project request locally yesterday. Before sending it again today, what do you check first?