
The .http File Format
The .http file format is supported by 16+ tools across IDEs, editors, CLIs, and parser libraries — but no formal RFC exists. This site is the neutral home for the format: a living specification, a cross-client compatibi…
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
The .http file format is supported by 16+ tools across IDEs, editors, CLIs, and parser libraries — but no formal RFC exists. This site is the neutral home for the format: a living specification, a cross-client compatibility reference, and a directory of every implementation. Client maintainers co-own it — see the standardization process.
Section titled “The simplest way to define an HTTP request”
Get all users
GET https://api.example.com/users
Accept: application/json
Create a new user
POST https://api.example.com/users
Content-Type: application/json
{
"name": "Jane Doe",
"email": "jane@example.com"
}
That's it. A plain text file. No SDK, no GUI, no config files. Save it as .http, open it in your editor, and run it.
Section titled “Why .http files?”
Readable. HTTP requests described in HTTP syntax. No abstraction layer.
Shareable. Commit them to your repo. Review them in PRs. Run them in CI.
Portable. Supported by VS Code, JetBrains IDEs, Neovim, Visual Studio, and CLI tools.
Composable. Variables, environments, response chaining, and scripting — when you need them.
The ecosystem at a glance
Section titled “The ecosystem at a glance”
Feature VS CodeJetBrainshttpyacVS 2022kulala Request line (METHOD URL [HTTP-version]) ✓ ✓ ✓ ✓ ✓ Method defaults to GET when omitted ✓ ✓ ✓ ✓ ✓ Multi-line URLs via indentation Continuation lines beginning with whitespace are concatenated to the URL. ✓ ✓ ✓ ✗ ✓ HTTP/2 version VS Code REST Client does not document HTTP/2 support. ✗ ✓ ✓ ✓ ✓ HTTP/2 (Prior Knowledge) Direct HTTP/2 without upgrade negotiation. ✗ ✓ ✗ ✗ ✗ HTTP/3 version Unique to Visual Studio 2022. ✗ ✗ ✗ ✓ ✗ Request separator (###) ✓ ✓ ✓ ✓ ✓ Line comments (#) ✓ ✓ ✓ ✓ ✓ Line comments (//) ✓ ✓ ✓ ✓ ✓ Block comments (/* */) Unique to httpyac. ✗ ✗ ✓ ✗ ✗ Text after ### as request title ✗ ✓ ✓ ✗ ✓ Request headers (Name: Value) ✓ ✓ ✓ ✓ ✓ Multi-line header values via indentation ✗ ✓ ✓ ✗ ✗ Spread headers (...variableName) Injects all key-value pairs from an object variable as headers. ✗ ✗ ✓ ✗ ✗ Request body after blank line ✓ ✓ ✓ ✓ ✓ URL-encoded form body with & prefixes ✓ ✓ ✓ ✓ ✓
Explore the full compatibility reference for detailed feature-by-feature comparison across all clients.
Section titled “Get started”
New to the format? What are .http files? explains it in two minutes, and Your First .http File has you sending requests in five.
The originator of the .http file format (circa 2017). VS Code extension with ~6K GitHub stars. Supports HTTP requests, variables, environments, and response viewing with rich editor integration.
Built into all JetBrains IDEs. The most feature-rich IDE implementation, with the only semi-formal spec attempt. Also available as a standalone CLI (ijhttp).
The most interoperable implementation. CLI tool and VS Code extension that supports both JetBrains and REST Client syntax while adding its own extensions. Bridges the gap between ecosystems.
Built-in since v17.6, significantly enhanced in v17.8+. Adopted JetBrains env format with Microsoft extensions including Azure Key Vault secrets providers.
Neovim plugin targeting 100% IntelliJ compatibility. Includes kulala-fmt formatter, kulala-ls language server, and a CLI with GitHub Action support.
See all clients and tools, or choose a client by editor and workflow.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。