Grammar

Definitions

Short description:

  • operator | denotes alternative,
  • operator * denotes iteration (zero or more),
  • operator + denotes iteration (one or more),

Syntax Grammar

hurl-file 
entry*
  lt*
entry 
request 
response 
method 
"GET"
| "HEAD"
| "POST"
| "PUT"
| "DELETE"
| "CONNECT"
| "OPTIONS"
| "TRACE"
| "PATCH"
url 
<(alphanum | ":" | "/" | "{" | "}" | "*" | "," | "@" | "]")+>
version 
"HTTP/1.0" | "HTTP/1.1" | "HTTP/2" | "HTTP/*"
status 
<[0-9]+>
lt*
  sp* key-value lt
body 
lt*
  sp* bytes lt
response-section 
query-string-params-section 
lt*
  sp* "[QueryStringParams]" lt
  param*
form-params-section 
lt*
  sp* "[FormParams]" lt
  param*
multipart-form-data-section 
lt*
  sp* "[MultipartFormData]" lt
  multipart-form-data-param*
cookies-section 
lt*
  sp* "[Cookies]" lt
  cookie*
captures-section 
lt*
  sp* "[Captures]" lt
  capture*
asserts-section 
lt*
  sp* "[Asserts]" lt
  assert*
param 
lt*
  sp* key-value lt
multipart-form-data-param 
file-param 
file-value 
"file," sp* filename sp* ";" (sp* file-contenttype)?
file-contenttype 
<(alphanum | "/" | ";" | "=" | " ")+ without leading/trailing space>
<(alphanum | "!" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*" | "+" | "-" | "." | "/" | ":" | "<" | "=" | ">" | "?" | "@" | "[" | "]" | "^" | "_" | "`" | "~" )* >
capture 
lt*
  sp* key-string sp* ":" sp* query (sp sp* subquery)? lt
status-query 
"status"
header-query 
"header" sp sp* quoted-string
"cookie" sp sp* quoted-string
body-query 
"body"
xpath-query 
"xpath" sp sp* quoted-string
jsonpath-query 
"jsonpath" sp sp* quoted-string
regex-query 
"regex" sp sp* quoted-string
variable-query 
"variable" sp sp* quoted-string
duration 
"duration"
subquery 
regex-subquery 
"regex" sp sp* quoted-string
assert 
predicate 
= ("not" sp sp*)? predicate-func
equal-predicate 
"equals" sp sp* (null | float | integer | boolean | quoted-string | expr)
greater-predicate 
"greaterThan" sp sp* (integer | float)
greater-or-equal-predicate 
"greaterThanOrEquals" sp sp* (integer | float)
less-predicate 
"lessThan" sp sp* (integer | float)
less-or-equal-predicate 
"lessThanOrEquals" sp sp* (integer | float)
count-predicate 
"countEquals" sp sp* integer
start-with-predicate 
"startsWith" sp sp* quoted-string
contain-predicate 
"contains" sp sp* quoted-string
match-predicate 
"matches" sp sp* quoted-string
exist-predicate 
"exists"
include-predicate 
"includes" sp sp* (null |float | integer | boolean | quoted-string | expr)
integer-predicate 
"isInteger"
float-predicate 
"isFloat"
boolean-predicate 
"isBoolean"
string-predicate 
"isString"
collection-predicate 
"isCollection"
key-value 
key-string 
<(alphanum | "_" | "-" | "." | escape-char)+ >
value-string 
<(anychar except escaped char and #| escape-char)* without leading/trailing space>
quoted-string 
""" <(anychar except escaped char | escape-char)*> """
expr 
"{{" sp* variable-name sp* "}}"
variable-name 
<(alphanum | "_" )+>
escaped-char 
"\""
| "\\"
| "\b"
| "\f"
| "\n"
| "\r"
| "\t"
| "\u" unicode-char
unicode-char 
"{" hexdigit+ "}"
bytes 
raw-string 
"```" (sp* newline)? (any characters) "```"
base64 
"base64," <base64 encoding with optional whitesp/padding> ";"
file 
"file," sp* filename sp* ";"
lt 
comment 
"#" <any characters except newline - does not end with sp>
newline 
"\n" | "\r\n"
sp 
" " | "\t"
filename 
<(alphanum | ".")+>
integer 
<-?[1-9][0-9]*>

TABLE OF CONTENTS