Quick start
This guide takes you from an empty window to a request with a variable and a passing test. You need Courier installed.
1. Create a workspace
Section titled “1. Create a workspace”A workspace is a folder on your disk. Courier stores each request in it as a .http file.
-
Open Courier. With no folder open, you see the welcome screen.
-
Click Create a new folder…, pick a name and a location.
-
Courier creates the folder with:
- a starter request,
http-client.env.jsonwith alocalenvironment,- a
.gitignorethat keeps the secrets file out of git.
Already have a Postman, Insomnia or Bruno collection? Use Import collection… on the welcome screen instead. See Import.
2. Send a request
Section titled “2. Send a request”-
Press ⌘N to create a request.
-
Type a URL in the URL bar, for example
https://httpbin.org/json. -
Press ⌘↵ to send.
The response appears on the right: the status, time and size at the top, and the body below. The Timing tab shows how long DNS, the TCP connection, the TLS handshake and the server each took. See Response viewer.
3. Use a variable
Section titled “3. Use a variable”-
Press ⌘E to open the environment editor.
-
In the
localenvironment, add a variablebaseUrlwith the valuehttps://httpbin.org. -
Back in the request, change the URL to
{{baseUrl}}/json. Typing{{lists the variables you can use. -
Press ⌘S to save, then ⌘↵ to send.
Switch environments with ⌘1 to ⌘9. See Environments.
4. Add a test
Section titled “4. Add a test”-
Open the request’s Assert tab.
-
Add a row: target
res.status, operatoreq, value200. -
Send the request again. The response’s Tests tab shows the check as passed.
The check is saved in the file as one line:
# @assert res.status eq 200See Assertions for every operator.
Next steps
Section titled “Next steps”- Learn the workspace and file format.
- Run a whole folder with the collection runner or
courier run. - Put the folder in git with the Git tab.