1. Create a file
Section titled “1. Create a file”Create a new file called requests.http in your project (or anywhere):
### Hello worldGET https://httpbin.org/getAccept: application/json2. Open it in your editor
Section titled “2. Open it in your editor”If you're using VS Code with the REST Client extension, any JetBrains IDE, Visual Studio 2022, or Neovim with kulala.nvim or rest.nvim — the file will be recognized automatically.
Look for a "Send Request" link or button above the GET line.
3. Send the request
Section titled “3. Send the request”Click "Send Request" (or use the keyboard shortcut — typically Ctrl+Alt+R in VS Code, Ctrl+Enter in JetBrains). The response appears in a side panel.
Adding variables
Section titled “Adding variables”@host = httpbin.org@accept = application/json
### Get request with variablesGET https://{{host}}/getAccept: {{accept}}
### Post requestPOST https://{{host}}/postContent-Type: application/json
{ "message": "Hello from a .http file", "timestamp": "{{$timestamp}}"}Variable definition with @var = value and substitution with {{var}} work in all clients.
Using environments
Section titled “Using environments”For switching between dev and production, create an http-client.env.json file alongside your .http file:
{ "development": { "host": "localhost:3000", "token": "dev-token-123" }, "production": { "host": "api.example.com", "token": "prod-token-456" }}Then reference the variables in your requests:
GET https://{{host}}/api/usersAuthorization: Bearer {{token}}The http-client.env.json format is supported by JetBrains, httpyac, Visual Studio 2022, and kulala.nvim. VS Code REST Client uses settings.json instead.
Next steps
Section titled “Next steps”- Read the full specification to understand every feature
- Choose a client for your platform
- Browse the compatibility reference to see what works where