Skip to content

Portability Guide

For maximum cross-tool compatibility, stick to these features:

### Request name as comment
# Variables
@host = api.example.com
@token = my-auth-token
### GET request
GET https://api.example.com/api/users
Accept: application/json
Authorization: Bearer token-value
### POST with JSON body
POST https://api.example.com/api/users
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com"
}

Specifically:

  • Standard HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
  • ### separators (with no text after them for full portability)
  • # or // comments
  • @var = value variable definitions
  • Variable substitution with double curly braces
  • < filepath file includes (except VS 2022)

Use http-client.env.json for environments. It's supported by 4 of 5 primary clients:

{
"development": {
"host": "localhost:3000",
"token": "dev-token"
},
"production": {
"host": "api.example.com",
"token": "prod-token"
}
}

VS Code REST Client is the outlier — it uses settings.json. If you need VS Code compatibility, either:

  1. Use httpyac as your VS Code client (it reads http-client.env.json)
  2. Maintain both formats

Some features are only available in specific clients. When you use them, document which client is required.

If you need...Target
Response handler scriptsJetBrains, httpyac, or kulala
Pre-request scriptsJetBrains, httpyac, or kulala
Compact assertions (??)httpyac
GraphQLJetBrains (GRAPHQL keyword) or httpyac (auto-detect)
WebSocketJetBrains, httpyac, or kulala
gRPCJetBrains, httpyac, or kulala
OAuth2 (full)httpyac
AWS authVS Code REST Client, httpyac, or kulala
Azure secretsVS 2022
Code generationVS Code REST Client
CI/CDijhttp (JetBrains CLI) or httpyac CLI

httpyac supports both JetBrains and VS Code REST Client syntax while adding its own extensions. If your team uses mixed editors, httpyac-compatible .http files are the closest thing to a universal format.

The .http format lacks a formal standard. This site documents what exists across all implementations and highlights where they diverge. The long-term goal is to help the community converge on a shared specification that preserves the format's simplicity while reducing unnecessary incompatibilities.

If you maintain an .http file client and want to contribute to this effort, the compatibility data is open for pull requests.