DotFetch
HTTP client for VS Code with environments, scripts and tests
๐ DotFetch
Professional HTTP Client for VS Code
Modern API Testing Made Simple
๐ฅ Marketplace โข ๐ Open VSX โข ๐ Documentation โข ๐ Report Issues
โจ What is DotFetch?
DotFetch is an HTTP client that lives inside VS Code. Build a request, press Send, and read the response, without leaving your editor or copying secrets into a separate app.
๐ฏ Key Benefits:
- Native VS Code Integration - Request Builder tab, sidebar views, and keyboard shortcuts that only fire in the Request Builder
- Environment Variables - Your
.envfiles become environments, with{{VARIABLE}}substitution everywhere - Comprehensive Authentication - API Key (Header & Query), OAuth 2.0 Client Credentials, Bearer Token, and Basic Auth
- Scripts & Tests - JavaScript before and after each request: sign requests, chain tokens, test responses
- Secrets Stay Out of Storage - Passwords, tokens, and keys are never saved to History or Collections;
{{VARIABLE}}references are - Performance & Memory Protected - 10 MB response limit and a display guard for responses over 1 MB
New in v2.2.0: Pre-Request and Post-Response scripts with
test()/assert(), crypto helpers for request signing, a wire-exact request pipeline (bodies and query strings sent byte for byte), status-coloured History, and full documentation.
๐ Quick Start
Installation
-
Install from VS Code Marketplace:
Ctrl+P โ ext install FreeRave.dotfetch -
Or search in Extensions:
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(Mac)- Search for "DotFetch"
- Click Install
Your First Request
- Open DotFetch: click the DotFetch icon in the Activity Bar, then New Request (or
Ctrl+Shift+Pโ "New Request") - Enter URL:
https://jsonplaceholder.typicode.com/posts/1 - Select Method: GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS
- Send Request: click Send or press
Ctrl+Enter/Cmd+Enter
๐ Get Started guide: first request, first POST, first .env variable, in five minutes.
๐จ Features
๐ง Core HTTP Client
|
Complete HTTP & Auth Support
Request Management
|
Response Analysis & Protection
|
๐ Environment Variables
|
Multi-Environment Support
Variable Substitution
|
Environment Tree View
|
๐ Environments guide
โ๏ธ Scripts & Tests (v2.2.0)
Run JavaScript before a request and after its response: sign requests, chain tokens between requests, and test every response.
// Pre-Request: sign the exact body that will be sent
const body = dotfetch.env.resolve(dotfetch.request.body);
dotfetch.request.headers['X-Signature'] = dotfetch.crypto.hmac('sha256', dotfetch.env.get('API_SECRET'), body);// Post-Response: test the response and save the token for the next request
test('Login succeeded', () => assert(dotfetch.response.status === 200, `Got ${dotfetch.response.status}`));
dotfetch.env.set('ACCESS_TOKEN', dotfetch.response.json().token);- โ
dotfetch.request/dotfetch.response: read and change params, headers, and body - โ
dotfetch.env: session variables that never touch your.envfiles - โ
test()/assert(): results in a dedicated Tests tab - โ
dotfetch.crypto/dotfetch.utils: SHA-256, HMAC, UUID, random nonces, UTF-8 Base64 - โ Fails closed: a failing Pre-Request script stops the request before it is sent
๐ Scripting guide ยท Copy-paste examples
๐ Collections & Organization
- โ Request Collections - Group requests by project or feature
- โ Request Notes - Keep documentation next to each request
- โ Duplicate, Edit & Delete - Manage requests from the sidebar
- โ Stored outside your project - Collections and History live in VS Code's extension storage, not in Git
๐ Collections, Favorites & History guide
๐ cURL Import/Export
|
cURL Export
|
cURL Import
|
๐ cURL guide
๐จ Professional UI/UX
- โ Native Theme - Follows VS Code's active colour theme
- โ Method Color Coding - Visual HTTP method distinction
- โ Loading States - Visual feedback for sending, retrying, and token fetching
- โ Smart Request Indicators - Active counts/dots for Params, Headers, Auth, Body, Scripts, and Notes
- โ Non-Destructive Row Toggles - Disable Params or Headers without deleting their values
- โ
Inline Copy Feedback - Green
โ Copiedstate only after successful clipboard writes - โ Toast System - Stacked in-WebView feedback with a maximum of three visible notifications
โจ๏ธ Keyboard Workflow
Ctrl+Enter/Cmd+Enterโ Send (press again to cancel)Alt+Dโ Focus and select the URL fieldCtrl+Alt+S/Cmd+Alt+Sโ Save Request to CollectionCtrl+Shift+Backspace/Cmd+Shift+Backspaceโ Clear Request Form?โ Toggle Keyboard Shortcuts HelpEscapeโ Close Active Modal
Shortcuts are registered as native VS Code keybindings scoped to the DotFetch Request Builder, so they never fire while another editor or panel is active.
๐ธ Screenshots
Main Interface
DotFetch Main Interface
Environment Variables
Environment Variables Panel
Request Collections
Collections Management
cURL Import/Export
cURL Import Export
๐ ๏ธ Configuration
Extension Settings
| Setting | Default | Description |
|---|---|---|
dotfetch.timeout | 10000 | Default timeout in milliseconds for new requests (1000โ300000) |
dotfetch.retryCount | 0 | Default retries when the server can't be reached (0โ5) |
dotfetch.sslVerify | true | Verify SSL/TLS certificates by default |
dotfetch.maxHistory | 50 | Maximum number of requests kept in History |
Timeout, retries, and SSL verification are defaults: each request can override them in its โ๏ธ tab.
Environment Files
DotFetch detects .env* files in your workspace root:
.env โ default
.env.local โ local
.env.development โ development (.env.dev works too)
.env.staging โ staging (.env.stage works too)
.env.production โ production (.env.prod works too)
.env.test โ testFiles ending in .example, .sample, .template, .schema, .lock, .bak, .swp, or ~ are ignored.
๐ Documentation
The full guide lives in docs/:
๐ง Development
Prerequisites
- Node.js 18+
- VS Code 1.80+
Building & Verification
# Install dependencies
npm install
# Development build (watch mode)
npm run watch
# Build (bundles extension and webview)
npm run compile
# Type check
npm run typecheck
# Lint code
npm run lint
# Build, lint, and run the test suite in VS Code
npm testProject Structure
dotfetch/
โโโ src/
โ โโโ extension.ts # Extension entry point, commands & activation
โ โโโ webviewPanel.ts # WebView lifecycle, message routing & History recording
โ โโโ requestService.ts # Request pipeline: scripts, substitution, auth, axios, OAuth
โ โโโ scriptRunner.ts # Pre/Post script runtime (vm), dotfetch.* APIs, test()/assert()
โ โโโ environmentManager.ts # .env discovery, parsing, session overlay & {{VAR}} substitution
โ โโโ dataManager.ts # GlobalState persistence (History, Collections, Favorites)
โ โโโ logger.ts # DotFetch Output channel
โ โโโ mainSidebar.ts # Quick Actions & Favorites tree
โ โโโ collectionTree.ts # Collections tree
โ โโโ historyTree.ts # History tree (status-coloured)
โ โโโ environmentTree.ts # Environments tree
โ โโโ utils/ # cURL parser & security helpers
โ โโโ webview/ # Webview frontend (bundled to media/script.js)
โ โ โโโ main.js # Coordinator & message handling
โ โ โโโ request.js # Request assembly, load/save & settings
โ โ โโโ auth.js # Auth flows & live previews
โ โ โโโ ui.js # Tables, response tabs, headers & tests inspector
โ โ โโโ curl.js # cURL import/export
โ โ โโโ shortcuts.js # Keyboard shortcuts
โ โ โโโ state.js # Webview state & persistable auth schema
โ โ โโโ api.js # postMessage bridge
โ โโโ test/
โ โโโ extension.test.ts # Test suite
โโโ media/ # Webview HTML/CSS, compiled bundle, icons & screenshots
โโโ docs/ # User documentation
โโโ package.json # Extension manifest & settings
โโโ CHANGELOG.md # Release notes๐ค Contributing
Contributions are welcome. See the Contributing Guide for details.
- Fork the repository
- Clone your fork:
BASH
git clone https://github.com/<your-username>/DotFetch.git cd DotFetch - Install dependencies:
npm install - Start the watcher:
npm run watch - Open in VS Code and press
F5to launch an Extension Development Host
๐ License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
๐ Acknowledgments
- VS Code Team for the amazing extension platform
- Axios for the reliable HTTP client
- Our Community for feedback and contributions
๐ Support
- Documentation: docs/
- Issues & feature requests: GitHub Issues
Made with โค๏ธ for the developer community
โญ Star us on GitHub โข ๐ Report Bug โข ๐ก Request Feature
Related Products
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ