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 JSONPathxpath— Query HTML/XML with XPathheader— Get a response header valuecookie— Get a cookie valueregex— Extract with a regular expressionstatus— HTTP status codeurl— Final URL after redirects
Asserting Response
Assert response properties with predicates:
Predicates
==,!=— Equality>,>=,<,<=— Comparisoncontains,not contains— Substringmatches,not matches— Regexexists,not exists— ExistenceisInteger,isBoolean,isString,isFloat,isList,isObject,isUuid,isIsoDate— Type checkscount,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