⚡ Zap Client – REST API Client for VS Code
A lightweight, Thunder Client–style REST API client that lives in your editor. No account, no cloud, no telemetry – your data stays on your machine (or in your repo).
Features
Requests
- All HTTP methods, URL ⇄ query-param table sync,
{{variable}} highlighting in the URL bar (red = undefined)
- Headers with autocomplete and Bulk Edit
- Body: JSON (validation + format, even with
{{vars}}), XML, Text, Form-encoded, Multipart form (files), GraphQL (query + variables), Binary file
- Auth: Basic, Bearer, API Key (header/query), Digest (MD5/SHA-256), OAuth 2.0 (client credentials, password, authorization code + PKCE, refresh token – auto-fetches a token on send), AWS Signature v4, inherit from collection
- Per-request settings: follow redirects, ignore SSL, timeout
- Paste a cURL command into the URL bar to import it
- Code snippets: cURL, fetch, axios, Python requests, Go, C#, PHP, PowerShell, Java, HTTPie
Responses
- Status, size, time, redirect count
- Pretty JSON with line numbers + JSON filter (
json.data[0].name, items[*].id), XML/HTML highlighting, HTML preview, image preview, raw view, word wrap
- Headers, Cookies, Test Results, Console (script logs), the request exactly as sent
- Copy or save the response to a file
Tests & scripting
- No-code tests: response code, body, time, JSON query, headers, content-type/length/encoding with equal / contains / < / > / count / type / regex / exists …
- Set Env Variable from
json.path, header.x, cookie.x or text (e.g. save a login token)
- Pre-run and post-run JavaScript scripts with
tc.* API, expect() assertions, tc.runRequest(), require('crypto'), fetch, async/await
- Collection-level pre/post scripts
Organisation
- Activity (history) with filter and "Save to collection"
- Collections with nested folders, drag & drop, duplicate, rename, collection-level headers / auth / variables / scripts
- Environments: Global + any number of envs, one active (status bar switcher), system vars
{{#guid}}, {{#timestamp}}, {{#number, 1, 100}}, {{#email}}, {{process.env.NAME}} …
- Collection runner: iterations, delay, stop on failure, CSV/JSON data-driven runs, export results
- Cookie jar (persisted), runtime variables
- Import: Postman v2.0/2.1 collections & environments, Thunder Client collections & environments, Insomnia v4, cURL, Zap Client JSON
- Export: Zap Client JSON, Postman v2.1, full backup
- Optional workspace storage (
.zap-client/zap-data.json) to commit collections to git and share with your team
- HTTP(S) proxy support
Responsive UI – the request editor switches between side-by-side and stacked layouts based on the editor width (container queries), tables collapse into cards on narrow panes, the splitter is draggable, and the layout can be forced via the ⇆ button or zapClient.layout.
Keyboard shortcuts
| Action |
Shortcut |
| Send |
Ctrl/Cmd + Enter (or Enter in the URL bar) |
| Save |
Ctrl/Cmd + S (Shift = save as) |
| New request |
Ctrl/Cmd + Alt + Shift + N |
Script API
// Pre Run
tc.setVar('ts', Date.now()); // active env (default), 'global' or 'request'
tc.request.setHeader('X-Sig', sign(tc.request.body));
const login = await tc.runRequest('Login'); // run another saved request
// Post Run
tc.test('status is 200', () => expect(tc.response.status).to.equal(200));
tc.test('has items', () => expect(tc.response.json.items).to.have.lengthOf(3));
tc.setVar('token', tc.response.json.token);
console.log(tc.response.headers['content-type']);
Install
code --install-extension zap-client-1.0.0.vsix
or in VS Code: Extensions → … → Install from VSIX…
Development
npm test # engine, codegen and importer tests (node --test)
npx @vscode/vsce package
Press F5 with the folder open to launch an Extension Development Host.
| |