Skip to content

.http files

.http files contain one or more HTTP requests. They follow the community-standard .http format compatible with VS Code REST Client and JetBrains HTTP Client.

### Get single user
GET https://api.example.com/users/42

The ### line names the request (optional). The next line is the method + URL. Supported methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD.

Use ### dividers to separate multiple requests:

### List users
GET https://api.example.com/users
### Get single user
GET https://api.example.com/users/42
### Create user
POST https://api.example.com/users
Content-Type: application/json
{
"name": "Jane Doe",
"email": "jane@example.com"
}
### Update user
PUT https://api.example.com/users/42
Content-Type: application/json
{ "name": "Jane Updated" }
### Delete user
DELETE https://api.example.com/users/42

Click any ▶ gutter button to run that specific request. Press ⌘⇧Enter to run all requests in the file sequentially.

Define variables before the first ###. Reference them anywhere with {{name}}.

@baseUrl = https://api.example.com
@token = secret-key
GET {{baseUrl}}/users
Authorization: Bearer {{token}}

Variables resolve in priority order: file-level → active .env file → extracted flow variables.

Write headers between the method line and the body (one header per line):

### Authenticated JSON request
POST https://api.example.com/users
Content-Type: application/json
Authorization: Bearer {{API_TOKEN}}
Accept: application/json
X-Request-Id: {{REQUEST_ID}}
{ "name": "Alice" }

Leave one blank line after the last header, then write the body:

### Create post
POST https://api.example.com/posts
Content-Type: application/json
{
"title": "Hello world",
"body": "My content here",
"userId": {{userId}}
}

Named requests can be referenced in flow files:

### Create Order
# @name createOrder
POST {{baseUrl}}/orders
Content-Type: application/json
{ "item": "widget", "qty": 3 }

Use # @file to attach a file and # @field for text fields. SendPad sets the Content-Type: multipart/form-data boundary automatically.

### Upload avatar
POST {{baseUrl}}/users/42/avatar
# @file photo = ../testdata/avatar.jpg
# @field description = "Profile photo for {{username}}"
# @field tag = profile
# @assert status == 200

Multiple files:

### Batch upload
POST {{baseUrl}}/documents
# @file primary = ../testdata/report.pdf
# @file secondary = ../testdata/appendix.pdf
# @field category = "Q4 Reports"

File paths are relative to the .http file. Store test files in a testdata/ folder.

For non-multipart binary uploads:

### Upload raw image
PUT {{baseUrl}}/avatars/me
Content-Type: image/jpeg
# @body = ../testdata/avatar.jpg

The cookie jar is enabled by default. Disable it for a specific file:

# @cookies off
### This request sends no cookies and ignores Set-Cookie
GET {{baseUrl}}/endpoint
  • ▶ gutter button — runs the request on that line
  • ⌘Enter — runs the request under the cursor
  • ⌘⇧Enter — runs all requests in the file sequentially