Configs2026年7月20日·1 分钟阅读

VS Code REST Client — Send HTTP Requests from Your Editor

A VS Code extension for sending HTTP requests and viewing responses directly in the editor, replacing standalone API clients like Postman for many workflows.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Single
信任
信任等级:Established
入口
VS Code REST Client
安全暂存命令
npx -y tokrepo@latest install 1a992a19-8419-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

Introduction

REST Client lets you send HTTP requests and view responses directly inside Visual Studio Code. You write requests in plain .http or .rest files that are human-readable, version-controllable, and shareable with your team — no separate GUI tool needed.

What VS Code REST Client Does

  • Send GET, POST, PUT, DELETE, and other HTTP methods from .http files
  • Display formatted response bodies with syntax highlighting
  • Support environment variables for switching between dev, staging, and production
  • Chain requests by referencing response values from previous calls
  • Generate code snippets for cURL, Python, JavaScript, and other languages

Architecture Overview

The extension parses .http and .rest files using a custom syntax that supports headers, body content, and variable interpolation. When you trigger a request, it executes the HTTP call using Node.js built-in modules, then renders the response in a side panel with syntax highlighting, timing information, and header inspection.

Self-Hosting & Configuration

  • Install from the VS Code marketplace with no external dependencies
  • Define environment variables in VS Code settings or a .env file
  • Configure default request headers that apply to all requests
  • Set response preview behavior (full body, headers only, or exchange view)
  • Enable certificate verification settings for self-signed HTTPS endpoints

Key Features

  • Plain-text .http files are easy to read, diff, and commit to version control
  • Multiple requests per file separated by ### delimiters
  • Variable support with @variable = value syntax and environment switching
  • Request history with quick replay of previous calls
  • GraphQL query support with syntax highlighting

Comparison with Similar Tools

  • Postman — full GUI application; REST Client keeps everything in your editor and version control
  • Insomnia — standalone app with collections; REST Client uses plain text files
  • Bruno — Git-friendly API client; REST Client requires no separate application
  • Hoppscotch — web-based API testing; REST Client works offline inside VS Code
  • cURL — command-line only; REST Client adds visual response formatting and variable management

FAQ

Q: Can I use environment variables for API keys? A: Yes. Define variables in VS Code settings per environment and switch between them with a status bar selector.

Q: Does it support authentication? A: Yes. Basic auth, bearer tokens, and custom headers are supported. You can also use variables to keep secrets out of committed files.

Q: Can I chain requests together? A: Yes. Name a request with # @name myRequest, then reference its response body in subsequent requests using {{myRequest.response.body.token}}.

Q: What file extensions are supported? A: .http and .rest files both activate the extension.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产