API Tester Pro
API Tester Pro is a lightweight REST client for Visual Studio Code. Build requests, inspect responses, organize saved calls, and reuse environment variables without leaving your editor.
Features
- Send GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS requests from the extension host.
- Edit query parameters and headers; send JSON or raw text bodies.
- Configure request timeouts and No Auth, Bearer Token, Basic, or API-key-header authentication.
- Inspect formatted JSON, raw response text, response headers, status, duration, and size.
- Search and copy response bodies.
- Keep a persistent request history and organize reusable requests in collections.
- Define Development, Staging, Production, or custom environments with
{{variable}} interpolation.
- Store authentication credentials and secret environment variables with VS Code SecretStorage.
- Use the full editor panel or Activity Bar sidebar; press Ctrl+Enter (Cmd+Enter on macOS) to send.
Screenshots
Screenshots will be added after the initial release.
Installation
- Download or package the extension as a VSIX.
- In VS Code, run Extensions: Install from VSIX... and select the package.
- Run API Tester Pro: Open API Tester from the Command Palette, or select the API Tester Pro Activity Bar icon.
Development setup
Requirements: Node.js 20.19+ for development and tests, and VS Code 1.85+ to run the extension.
npm install
npm run compile
npm test
Open this folder in VS Code and press F5 to launch the Extension Development Host. The extension host performs all HTTP requests; the webview does not make network requests.
Usage
- Open API Tester Pro and enter an absolute
http:// or https:// URL.
- Select the method, then configure Params, Headers, Body, and Authorization as needed.
- Set a timeout in milliseconds and click Send (or press Ctrl+Enter).
- Inspect the response with Pretty, Raw, and Headers tabs. Use search or Copy as needed.
- Use Save to add the request to a collection. Use the sidebar to reload saved requests or history.
- Open Manage beside the environment picker to add variables. Mark credentials or other sensitive values as Secret; those values are stored in VS Code SecretStorage and omitted from the webview's environment list.
Authentication credentials are not returned from SecretStorage to the webview after saving. They remain in the current editor memory for the active view and may be saved explicitly for subsequent requests. Request history and collections omit authentication credential fields and sensitive header values. Do not put credentials directly in request bodies if you do not want those bodies retained in collections or history.
Architecture
src/extension.ts activates the extension and registers the Activity Bar view.
src/commands/ registers the command entry point.
src/providers/ handles webview lifecycle and validates messages at the extension boundary.
src/services/HttpService.ts executes Axios requests from the Node-based extension host.
src/services/HistoryService.ts, CollectionService.ts, and EnvironmentService.ts persist history, collections, and environment variables.
src/models/ contains request and response types.
src/utils/WebviewUtils.ts builds the CSP-restricted webview document.
media/ contains the webview JavaScript, CSS, and Activity Bar icon.
test/ contains the Mocha service tests.
Technologies
TypeScript, VS Code Extension API, Webview API, Axios, HTML, CSS, JavaScript, Node.js, Mocha, and Nock.
Commands
| Command |
Description |
API Tester Pro: Open API Tester |
Open or focus the API Tester panel |
Roadmap
- Import/export collections.
- Request-level authentication profiles.
- Additional response visualizations and request scripting.
Contributing
Contributions are welcome. Keep changes focused, run npm test and npm run compile, and describe user-visible behavior changes in the pull request.
| |