Operators and curl flags

Operators are metadata lines starting with # @ or // @. They can appear in the file header (before the first request) or inside a request block.

Built-in operators

OperatorPurpose
@kulala-expect-status-codeFail if response status is not in the list
@kulala-promptInteractive prompt (@prompt still works as alias)
@timeoutTotal request timeout (5 ms, 5 s)
@connection-timeoutConnection phase timeout
@no-cookie-jarDo not send or store cookies for this request
@no-logSkip logging for this request
@no-auto-encodingDisable automatic URL encoding
@no-redirectDo not follow redirects
@acceptResponse accept handling (e.g. chunked)
@kulala-file-contents-to-variableLoad a file into a variable before send
@kulala-vscode-restclient-compatEnable VS Code REST Client request chaining

Examples

operators.httphttp
### EXPECT_STATUS_404

// @kulala-expect-status-code 404

GET https://echo.kulala.app/status/404 HTTP/1.1

### PROMPT_REQUEST

// @kulala-prompt "What is your name?" NAME

GET https://echo.kulala.app/get?name={{NAME}} HTTP/1.1

### INSECURE_REQUEST_TIMEOUT_REQUEST

// @kulala-curl--insecure
// @timeout 5 ms

POST https://echo.kulala.app/post HTTP/1.1
Content-Type: application/json

{ "username": "user123" }

### NO_COOKIE_JAR_REQUEST

// @no-cookie-jar

GET https://echo.kulala.app/cookies HTTP/1.1

### NO_LOG_REQUEST

// @no-log

POST https://echo.kulala.app/anything HTTP/1.1
Content-Type: application/json

{ "username": "user123" }

### NO_AUTO_ENCODING_REQUEST

// @no-auto-encoding

GET https://echo.kulala.app/get?
            name=@#$somebody&
            qwerty=%40%23%24

### CONNECTION_TIMEOUT_PRIVATE_IP_NO_RESOLVE

// @kulala-curl--insecure
// @timeout 5 s
// @connection-timeout 5 s
POST https://10.77.77.77:1337/login HTTP/1.1
Content-Type: application/json

{ "username": "bar", "password": "baz" }

Curl passthrough (@kulala-curl--*)

Pass arbitrary curl long options to the underlying curl binary. Use double dashes after kulala-curl-:

curl-passthrough.httphttp
# @kulala-curl--insecure
# @kulala-curl--connect-timeout 5
# @kulala-curl--max-time 5

POST https://echo.kulala.app/post HTTP/1.1
Content-Type: application/json

{ "username": "user123" }

Short single-letter flags use one dash: // @kulala-curl-k-k.

Migration note: Older Kulala docs used # @curl-insecure, # @curl-location, etc. In kulala-core these are replaced by # @kulala-curl--insecure, # @kulala-curl--location, and so on. See Migration.