Skip to content

Requests

The request line is the first non-empty, non-comment line of a request block:

[Method] Request-URL [HTTP-Version]
Universal Supported identically by all major implementations.

This format is supported by all implementations. Method defaults to GET when omitted.

The JetBrains spec formally defines: GET, HEAD, POST, PUT, DELETE, CONNECT, PATCH, OPTIONS, TRACE.

VS Code REST Client extends this with WebDAV methods: LOCK, UNLOCK, PROPFIND, PROPPATCH, COPY, MOVE, MKCOL, MKCALENDAR, ACL, SEARCH.

httpyac supports all of the above plus: CHECKOUT, CHECKIN, REPORT, MERGE, MKACTIVITY, MKWORKSPACE, VERSION-CONTROL, BASELINE-CONTROL.

HTTP-Version is optional. Standard values are HTTP/1.1 and HTTP/2. VS Code REST Client does not document HTTP/2 support.

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

All implementations except Visual Studio 2022 support line continuation for URLs via indentation. Continuation lines beginning with whitespace (space or tab) are concatenated to the request URL:

GET https://example.com/api
/users
?page=2
&limit=10

Query parameters can also be placed on separate lines starting with ? or &.

Headers follow the request line, one per line, in Field-Name: Field-Value format. A blank line terminates the header section and begins the body.

POST https://api.example.com/data
Content-Type: application/json
Authorization: Bearer mytoken123
Accept: application/json
{"key": "value"}
Universal Supported identically by all major implementations.

Basic header syntax is universal across all implementations.

VS Code REST Client automatically adds User-Agent: vscode-restclient and Accept-Encoding: gzip unless overridden (configurable via rest-client.defaultHeaders).

JetBrainshttpyac

Header values can span multiple lines via indentation in JetBrains and httpyac.

httpyac

httpyac uniquely supports a spread syntax: ...variableName on a header line injects all key-value pairs from an object variable as headers.

The body begins after the first blank line following headers. Everything after that blank line until the next request separator (###) or response handler (>) is the request body.

POST https://api.example.com/users
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com"
}
Universal Supported identically by all major implementations.

Request body syntax is universal.

Form bodies with Content-Type: application/x-www-form-urlencoded can use multiple lines with & prefixes:

POST https://api.example.com/login
Content-Type: application/x-www-form-urlencoded
username=admin
&password=secret
&remember=true

This multi-line form syntax is supported by all major implementations.