Skip to content

Your first request

This walkthrough takes about five minutes. You’ll create a workspace, send an HTTP request, save it into your collection and make it work against more than one server with an environment.

In the shortcuts below, Mod means ⌘ on macOS and Ctrl on Windows and Linux.

A workspace is a folder of YAML files that holds your requests (see Workspaces).

  1. On the welcome screen, choose New workspace.
  2. Give it a Name (the default is My Workspace).
  3. Under Folder, type a path or choose Browse…. Pick an empty folder, or a folder inside your project’s Git repository.
  4. Choose Create workspace.

Zorvik writes zorvik.yaml plus empty requests/ and environments/ folders, and opens the workspace.

Press Mod+N. A new tab opens with an HTTP GET request named “New request”. Its name is in italics because it isn’t saved yet, and the cursor is already in the URL field.

Type or paste a URL, for example:

https://jsonplaceholder.typicode.com/todos/1

A URL without a scheme is sent as http://. To change the method, open the method menu on the left of the URL (see HTTP requests).

Press Mod+Enter, press Enter in the URL field, or choose Send.

While the request runs, the response pane shows a timer, and Send turns into Cancel.

The line above the response shows:

  • the status, such as 200 OK, colored by class (2xx, 3xx, 4xx, 5xx)
  • the total time and the body size (hover the size to see how many bytes came over the wire)
  • the protocol (HTTP/1.1, HTTP/2 or HTTP/3), and a lock when the connection used TLS

Below it are the response tabs:

TabShows
BodyThe body as Pretty JSON, Raw text or a Preview of HTML and images
HeadersEvery response header
CookiesCookies the response set
TimingWhere the time went: DNS lookup, TCP connect, TLS handshake, waiting for the first byte, download
InfoThe connection, the TLS certificate, redirects and the exact request that was sent

See Responses for everything they can do.

Press Mod+S. Because the request isn’t saved yet, the Save request dialog opens:

  1. Enter a Name, for example Get todo.
  2. Leave Folder on Workspace root, or pick a folder.
  3. Choose Save.

The request is written to requests/Get todo.yaml and appears in the Collection sidebar. From now on, Mod+S saves it in place. The save button next to Send is highlighted whenever the tab has unsaved changes.

In the Collection sidebar:

  • Choose + (next to Filter) for New folder, or for a new request of any kind: HTTP, GraphQL, gRPC, WebSocket, Socket.IO, SSE, TCP, UDP, DNS or MQTT. Requests created this way ask for a name and are saved right away.
  • Drag requests and folders to reorder them, or drop them onto a folder to move them there.
  • Right-click an item for Rename…, Duplicate, Move to… and Delete. Deleted items go to your system’s trash.
  • Type in Filter to show only matching requests.

Folders can hold auth, headers and scripts that apply to every request inside them. See Workspaces.

Environments let one request run against different servers, for example your laptop and a staging server.

  1. Press Mod+E to open Environments & variables.

  2. Next to Environments, choose + (New environment). Rename it Local in the name field.

  3. Add a variable: baseUrl with the value https://jsonplaceholder.typicode.com.

  4. Choose Save changes, then Close.

  5. In the title bar, open the environment picker (it says No environment) and choose Local.

  6. Change the request’s URL to:

    {{baseUrl}}/todos/1

{{baseUrl}} is highlighted as a known variable. Hover it to see its value and where it comes from. Send the request again: it goes to the same address.

Add a Staging environment with a different baseUrl, and switching environments in the title bar is all it takes to send the same request to another server. See Variables & environments.