Manual

hurlx files use a simple plain text format. Every hurlx file is a valid Hurl file — the import/export extensions are optional additions.

Request

A request starts with an HTTP method followed by a URL. Supported methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS.

Headers

Headers follow the request line:

Query Parameters

Request Body

JSON body:

Form data:

Multipart:

Basic Auth:

Response

Responses are optional. When present, hurlx checks the status code and can perform additional assertions.

Use a wildcard to skip status code checking:

Capturing Response

Capture values from responses to reuse in subsequent requests:

Query Types

  • jsonpath — Query JSON body with JSONPath
  • xpath — Query HTML/XML with XPath
  • header — Get a response header value
  • cookie — Get a cookie value
  • regex — Extract with a regular expression
  • status — HTTP status code
  • url — Final URL after redirects

Asserting Response

Assert response properties with predicates:

Predicates

  • ==, != — Equality
  • >, >=, <, <= — Comparison
  • contains, not contains — Substring
  • matches, not matches — Regex
  • exists, not exists — Existence
  • isInteger, isBoolean, isString, isFloat, isList, isObject, isUuid, isIsoDate — Type checks
  • count, not count — Collection size

Import / Export

The key feature that distinguishes hurlx from Hurl. Export variables from one file and import them in another.

Export

Export captured or defined variables for use in other files:

Export with Values

Define and export configuration values:

Import

Import exported variables from another file:

Filters

Filters transform captured values:

Templates

Use {{}} for variable interpolation:

Built-in Functions

  • {{uuid}} — Generate a UUID
  • {{date 'format'}} — Current date
  • {{randomHex N}} — Random hex string
  • {{getenv 'VAR'}} — Environment variable
  • {{now}} — Current timestamp