Request line
Section titled “Request line”The request line is the first non-empty, non-comment line of a request block:
[Method] Request-URL [HTTP-Version]This format is supported by all implementations. Method defaults to GET when omitted.
Supported methods
Section titled “Supported methods”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
Section titled “HTTP version”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 Code | JetBrains | httpyac | VS 2022 | kulala |
|---|---|---|---|---|---|
| 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 |
Multi-line URLs
Section titled “Multi-line URLs”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=10Query parameters can also be placed on separate lines starting with ? or &.
Request headers
Section titled “Request headers”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/dataContent-Type: application/jsonAuthorization: Bearer mytoken123Accept: application/json
{"key": "value"}Basic header syntax is universal across all implementations.
Default headers
Section titled “Default headers”VS Code REST Client automatically adds User-Agent: vscode-restclient and Accept-Encoding: gzip unless overridden (configurable via rest-client.defaultHeaders).
Multi-line header values
Section titled “Multi-line header values”Header values can span multiple lines via indentation in JetBrains and httpyac.
Spread headers
Section titled “Spread headers”httpyac uniquely supports a spread syntax: ...variableName on a header line injects all key-value pairs from an object variable as headers.
Request body
Section titled “Request body”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/usersContent-Type: application/json
{ "name": "John Doe", "email": "john@example.com"}Request body syntax is universal.
URL-encoded form body
Section titled “URL-encoded form body”Form bodies with Content-Type: application/x-www-form-urlencoded can use multiple lines with & prefixes:
POST https://api.example.com/loginContent-Type: application/x-www-form-urlencoded
username=admin&password=secret&remember=trueThis multi-line form syntax is supported by all major implementations.