Requests
Build and send HTTP requests, choose a body mode, read the response, and generate code for the web app.
Watch this in the tutorial: Everyday API work (2:43)A request is one saved call to an API. You build it in the request editor, send it with Send, and read the result in the response pane. Each request is saved as its own YAML file in the workspace, so a change to one call shows up as one small diff in Git.
Build a request
The URL bar sits at the top of the request editor. It holds the method, the URL and the protocol.
- Choose a method from the method menu, then type the URL in the URL bar.
- Use variables such as
{{base_url}}for the host. Getman resolves them from the active environment when you send. - Add path parameters with a colon, such as
/orders/:id. Getman creates a row for each one under Params, so you can fill in a value per request. - Open the other tabs as needed:
| Tab | Holds |
|---|---|
| Params | Query parameters and path parameters |
| Headers | Request headers |
| Auth | Authentication for this request, or Inherit |
| Body | The request body |
| Scripts | Pre-request and post-response scripts |
| Tests | No-code assertions and extractors |
| Settings | Per-request options, such as Send cookies from jar |
A tab with content shows a count or a dot, so you can see what is set without opening it.
Protocols
The protocol menu in the URL bar holds HTTP, and the Other protocols group holds GraphQL, WebSocket and Server-Sent Events. A GraphQL request uses the Query tab in place of Body. WebSocket requests receive text and binary frames and send text. Server-Sent Events use the same pipeline as HTTP.
Body modes
The Body tab offers these modes:
| Mode | Use it for |
|---|---|
| None | GET requests and anything without a body |
| JSON | application/json payloads |
| Text | Plain text |
| XML | XML documents |
| Form | application/x-www-form-urlencoded fields |
| Multipart | multipart/form-data, with text and file parts |
| File | A single binary file |
File paths in multipart and file bodies are never exported into an OpenAPI contract.
Send and read the response
- Press Send, or ⌘↵ on macOS and Ctrl+Enter elsewhere.
- Read the status, the headers and the body in the response pane.
- Press ⌘. to cancel a request that is still running.
- Press ⌘S to save the request.
Failing 4xx and 5xx responses
A 4xx or 5xx response fails the request in the app, the runner, the command line and agents. The check Status is not an HTTP error is added to the result. Before this change, the CLI reported a 500 with no tests as passed.
If the status is the one you expect, add a status assertion for it. For example, a request that checks the unauthorized case should have Status is 401. A passing assertion for that status makes the request pass.
Generate code
Use ⋯ → Generate code… to produce a snippet in Fetch or Axios for your web app. Copy as cURL puts the request on the clipboard as a shell command, with ⌘⇧C as the shortcut. OAuth 2.0 credentials are not exported into snippets.
Keyboard shortcuts
| Action | macOS | Other systems |
|---|---|---|
| New request | ⌘N | Ctrl+N |
| Send | ⌘↵ | Ctrl+Enter |
| Save | ⌘S | Ctrl+S |
| Focus the URL bar | ⌘L | Ctrl+L |
| Copy as cURL | ⌘⇧C | Ctrl+Shift+C |
See Keyboard shortcuts for the full list.