Workspaces and .http files
Courier works on a workspace: a folder you pick. Every request is a .http file in that folder, and every subfolder shows as a folder in the sidebar. Nothing is stored on a server.
What’s in a workspace
Section titled “What’s in a workspace”Directorymy-api/
- http-client.env.json environments, commit this
- http-client.private.env.json secrets, keep out of git
Directory.courier/
- order.json sidebar order, when you drag things around
Directoryschemas/ cached GraphQL and gRPC schemas
- …
Directoryauth/
- login.http
- .folder.json folder settings
Directorypayments/
- create-charge.http
http-client.env.jsonholds your environments.http-client.private.env.jsonholds secret values. Add it to.gitignore. Workspaces you create in Courier do this for you..folder.jsonholds a folder’s settings: shared headers, auth, variables and scripts.
The .http format
Section titled “The .http format”Courier reads and writes the JetBrains HTTP Client format, so the same files work in IntelliJ, the VS Code REST Client and httpyac.
### create-chargePOST {{baseUrl}}/v1/charges?expand=customerAuthorization: Bearer {{token}}Idempotency-Key: {{$uuid}}# @disabled X-Debug-Trace: 1Content-Type: application/json
{ "amount": 4200, "currency": "usd" }###starts a request. The text after it is the request’s name.- The first line is the method and URL. Headers follow, then a blank line and the body.
- Lines that start with
#are comments. Courier uses# @…comments for its own settings, such as# @name,# @assertand# @auth. Other tools ignore them.
You edit all of this through the app, so you don’t need to write the syntax by hand. For the full list of directives, see .http syntax.
Open, close and switch folders
Section titled “Open, close and switch folders”- Open a folder: ⌘O, or Open a folder… on the welcome screen.
- Recent folders: listed on the welcome screen and under Open recent in the command palette. Right-click one to remove it. Folders that were moved or deleted show greyed out.
- Courier reopens the last folder when it starts. Turn this off in Settings → General.
Organize requests
Section titled “Organize requests”- Drag requests and folders in the sidebar to reorder or move them. A custom order is saved in
.courier/order.json. - Press F2 to rename the selected request.
- Press / to filter the sidebar.
- Right-click a request or folder for more actions, such as Run folder…, Folder settings… and Export.