Skip to main content
Back to Products
vscode

DotFetch

Fetch and display system info in VS Code

0 stars0 forks0 issues2,746 downloadsVersion v2.1.1VSX 2.1.1
DotFetch β€’ READMEβ€’9 min read

πŸš€ DotFetch

Professional HTTP Client for VS Code

Modern API Testing Made Simple

Version VS Code License

πŸ“₯ Marketplace β€’ 🌐 Open VSX β€’ πŸ“– Documentation β€’ πŸ› Report Issues


✨ What is DotFetch?

DotFetch is a powerful, modern HTTP client built specifically for VS Code. Designed for developers who demand the best tools for API testing, debugging, and development workflows.

🎯 Key Benefits:

  • Native VS Code Integration - Seamless experience within your development environment
  • Environment Variables - Full support for .env files with live substitution
  • Comprehensive Authentication - API Key (Header & Query), OAuth 2.0 Client Credentials, Bearer Token, and Basic Auth
  • Developer-Friendly Security - SSL/TLS verification toggle for localhost development, password visibility toggles, and safe non-persistent credential storage
  • Professional UI - Dark theme optimized interface matching VS Code aesthetics with Response Body and Headers inspector tabs
  • Performance & Memory Protected - 10MB payload size limits and large response truncation guards

v2.1.1 Runtime Verified: DotFetch v2.1.1 keeps the hardened v2.1 request engine and adds a fully runtime-verified UI/UX polish pass across the Request Builder, Response Viewer, Sidebar, Auth/Environment presentation, keyboard workflow, and toast/micro-interaction system.


πŸš€ Quick Start

Installation

  1. Install from VS Code Marketplace:

    Ctrl+P β†’ ext install FreeRave.dotfetch
  2. Or search in Extensions:

    • Open VS Code
    • Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac)
    • Search for "DotFetch"
    • Click Install
  3. Reload VS Code and you're ready to go!

Your First Request

  1. Open DotFetch: Ctrl+Shift+P β†’ "DotFetch: Open HTTP Client"
  2. Enter URL: https://jsonplaceholder.typicode.com/posts/1
  3. Select Method: Choose from GET, POST, PUT, DELETE, etc.
  4. Send Request: Click the Send button or press Ctrl+Enter / Cmd+Enter

🎨 Features

πŸ”§ Core HTTP Client

Complete HTTP & Auth Support

  • βœ… All HTTP Methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
  • βœ… API Key Auth (Header or Query Parameter with live preview)
  • βœ… OAuth 2.0 (Client Credentials flow with ⚑ direct token fetching)
  • βœ… Bearer Token & Basic Auth (with {{ENV}} variable substitution)
  • βœ… Show/Hide Secret Toggles (πŸ‘οΈ / πŸ™ˆ)
  • βœ… SSL Toggle for local https://localhost / self-signed certs
  • βœ… Request Body (JSON, Text, Form Data)
  • βœ… Structured Key-Value Headers & Query Parameters
  • βœ… Configurable Timeout & Network Retry

Advanced Request Features

  • βœ… Request Collections with one-click Save & Load
  • βœ… Ephemeral Session Token handling (prevents secret leakage)
  • βœ… Request Templates for reusability
  • βœ… Request History with search & filters
  • βœ… Request validation before sending
  • βœ… Syntax highlighting for JSON bodies

Response Analysis & Protection

  • βœ… Formatted JSON responses with syntax highlighting
  • βœ… Response Headers Inspector (dedicated key-value table)
  • βœ… Visual Payload Size & Time measurement
  • βœ… Large Response Guard (protection against huge payloads)
  • βœ… Advanced Error Explanations & cancellation support

🌍 Environment Variables

Multi-Environment Support

  • βœ… .env, .env.local, .env.development
  • βœ… .env.production, .env.test
  • βœ… Automatic environment detection
  • βœ… Environment switching

Live Variable Substitution

  • βœ… {{VARIABLE_NAME}} syntax
  • βœ… Real-time highlighting
  • βœ… Pre-send validation
  • βœ… Missing variable warnings

Environment Tree View

  • βœ… VS Code sidebar integration
  • βœ… Variable explorer
  • βœ… Copy variable values
  • βœ… Refresh environments

πŸ“ Collections & Organization

  • βœ… Request Collections - Group requests by project/feature
  • βœ… One-Click Export - Portable JSON backups
  • βœ… Request Annotations - Save notes for documentation
  • βœ… Save & Load - One-click request management
  • βœ… Collection CRUD - Full create, read, update, delete operations

πŸ”„ Import/Export

cURL Export

  • βœ… Generate complete cURL commands
  • βœ… Include all headers & body
  • βœ… Clipboard integration
  • βœ… One-click copy

cURL Import

  • βœ… Parse complex cURL commands
  • βœ… Auto-extract method, URL, headers
  • βœ… Smart body detection
  • βœ… Error handling for malformed commands

🎨 Professional UI/UX

  • βœ… Native Dark Theme - Automatically syncs with VS Code's active theme
  • βœ… Native VS Code Keyboard Workflow - Ctrl+Enter Send, Alt+D Focus URL, Ctrl+Alt+S Save, Ctrl+Shift+Backspace Clear, ? Help
  • βœ… Method Color Coding - Visual HTTP method distinction
  • βœ… Responsive Design - Works on all screen sizes
  • βœ… Loading States - Visual feedback for all operations
  • βœ… Context Menus & Modals - Professional fluid interactions
  • βœ… Pretty / Raw Response Views - Fast switching between formatted and raw payloads
  • βœ… Smart Request Indicators - Active counts/dots for Params, Headers, Auth, Body, and Notes
  • βœ… Non-Destructive Row Toggles - Disable Params or Headers without deleting their values
  • βœ… Inline Copy Feedback - Green βœ“ Copied state only after successful clipboard writes
  • βœ… Environment Guidance - Missing-environment variable warning plus responsive active-environment tooltip
  • βœ… Toast System - Stacked in-WebView feedback with a maximum of three visible notifications

⌨️ Keyboard Workflow

  • Ctrl+Enter / Cmd+Enter β€” Send Active Request
  • Alt+D β€” Focus and select the URL field
  • Ctrl+Alt+S / Cmd+Alt+S β€” Save Request to Collection
  • Ctrl+Shift+Backspace / Cmd+Shift+Backspace β€” Clear Request Form
  • ? β€” Toggle Keyboard Shortcuts Help
  • Escape β€” Close Active Modal

Host-level shortcuts are registered through native VS Code keybindings and are scoped to the active DotFetch Request Builder, preventing actions from firing while another editor or panel is active.


πŸ“Έ Screenshots

Main Interface

DotFetch Main InterfaceDotFetch Main Interface

Environment Variables

Environment Variables PanelEnvironment Variables Panel

Request Collections

Collections ManagementCollections Management

cURL Import/Export

cURL Import ExportcURL Import Export

πŸ› οΈ Configuration

Extension Settings

DotFetch contributes the following settings:

JSON
{
  "dotfetch.timeout": {
    "type": "number",
    "default": 10000,
    "description": "Default request timeout in milliseconds"
  },
  "dotfetch.sslVerify": {
    "type": "boolean",
    "default": true,
    "description": "Enable SSL certificate verification (disable for localhost or self-signed certs)"
  },
  "dotfetch.autoSave": {
    "type": "boolean",
    "default": true,
    "description": "Automatically save requests to history"
  },
  "dotfetch.maxHistory": {
    "type": "number",
    "default": 50,
    "description": "Maximum number of requests to keep in history"
  }
}

Environment Files

DotFetch automatically detects these environment files in your workspace:

CODE
.env                    # Base environment
.env.local            # Local overrides
.env.development      # Development specific
.env.production       # Production settings
.env.test            # Test environment

πŸ“– Usage Guide

Basic Request

  1. Open DotFetch from the sidebar or command palette
  2. Enter URL in the URL field
  3. Select HTTP Method from dropdown
  4. Add Headers (optional) - one per line: Key: Value
  5. Add Body (optional) - JSON or text
  6. Click Send or press Enter

Using Environment Variables

  1. Create .env file in your workspace root:

    BASH
    API_BASE_URL=https://api.example.com
    API_KEY=your_secret_key
  2. Use in requests:

    CODE
    URL: {{API_BASE_URL}}/users
    Headers:
    Authorization: Bearer {{API_KEY}}
  3. Variables highlight in real-time and validate before sending

Managing Collections

  1. Create Collection: Click "New Collection" β†’ Enter name
  2. Save Request: Fill request β†’ Click "Save" β†’ Select collection
  3. Load Request: Expand collection β†’ Click request name
  4. Organize: Drag and drop to reorder collections

cURL Operations

Export to cURL:

  • Fill request details
  • Click "Export cURL"
  • Command copied to clipboard

Import from cURL:

  • Click "Import cURL"
  • Paste cURL command
  • Click "Import" - fields auto-populate

πŸ”§ Development

Prerequisites

  • Node.js 16+
  • VS Code 1.74+
  • TypeScript 5.0+

Building & Verification

DotFetch uses automated quality gates alongside manual runtime verification.

BASH
# Install dependencies
npm install

# Development build (watch mode)
npm run watch

# Production build (bundles extension and webview)
npm run compile

# Type check
npm run typecheck

# Lint code
npm run lint

Runtime verification covers all authentication flows, networking behavior, credential persistence boundaries, response limits, and SSL/TLS handling.

Project Structure

CODE
dotfetch/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ extension.ts          # Main extension entry point & activation
β”‚   β”œβ”€β”€ webviewPanel.ts       # WebView lifecycle, message routing & HTML builder
β”‚   β”œβ”€β”€ requestService.ts     # Axios execution engine, SSL Agent & OAuth handler
β”‚   β”œβ”€β”€ dataManager.ts        # GlobalState persistence (History & Collections)
β”‚   β”œβ”€β”€ environmentManager.ts # Environment variable loading & interpolation
β”‚   β”œβ”€β”€ collectionTree.ts     # Sidebar Collections tree view provider
β”‚   β”œβ”€β”€ historyTree.ts        # Sidebar History tree view provider
β”‚   β”œβ”€β”€ environmentTree.ts    # Sidebar Environment tree view provider
β”‚   β”œβ”€β”€ webview/              # Modular Frontend (MVC Architecture)
β”‚   β”‚   β”œβ”€β”€ main.js           # Central webview coordinator & entry point
β”‚   β”‚   β”œβ”€β”€ request.js        # Request assembling, execution & draft/wire separation
β”‚   β”‚   β”œβ”€β”€ auth.js           # Comprehensive Auth flows, live previews & RFC validation
β”‚   β”‚   β”œβ”€β”€ ui.js             # Key-value tables, response tabs & headers inspector
β”‚   β”‚   β”œβ”€β”€ shortcuts.js      # Keybindings & shortcut customization
β”‚   β”‚   β”œβ”€β”€ curl.js           # cURL command generator & parser
β”‚   β”‚   β”œβ”€β”€ state.js          # Canonical webview state & auth schema factory
β”‚   β”‚   └── api.js            # PostMessage abstraction layer
β”‚   └── test/
β”‚       └── extension.test.ts # Test suite
β”œβ”€β”€ media/
β”‚   β”œβ”€β”€ index.html            # Webview HTML template
β”‚   β”œβ”€β”€ script.js             # Compiled webview IIFE bundle (via esbuild)
β”‚   β”œβ”€β”€ styles.css            # Dark theme & glassmorphic styling
β”‚   └── icon.png              # Extension icon
β”œβ”€β”€ package.json              # Extension manifest & configuration schemas
β”œβ”€β”€ tsconfig.json             # TypeScript configuration
└── CHANGELOG.md              # Detailed release notes

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository
  2. Clone your fork:
    BASH
    git clone https://github.com/yourusername/dotfetch.git
    cd dotfetch
  3. Install dependencies:
    BASH
    npm install
  4. Start development:
    BASH
    npm run watch
  5. Open in VS Code and press F5 to debug

Testing

BASH
# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run specific test file
npm test -- --grep "Environment Manager"

πŸ“„ 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


Made with ❀️ for the developer community

⭐ Star us on GitHub β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature

Related Products

β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ
β€Œ