mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-26 20:42:01 +03:00
23 KiB
23 KiB
Grammar
Definitions
Short description:
- operator | denotes alternative,
- operator * denotes iteration (zero or more),
- operator + denotes iteration (one or more),
Syntax Grammar
method
= "GET"
| "HEAD"
| "POST"
| "PUT"
| "DELETE"
| "CONNECT"
| "OPTIONS"
| "TRACE"
| "PATCH"
| "HEAD"
| "POST"
| "PUT"
| "DELETE"
| "CONNECT"
| "OPTIONS"
| "TRACE"
| "PATCH"
url
= <(alphanum | ":" | "/" | "{" | "}" | "*" | "," | "@" | "]")+>
version
= "HTTP/1.0" | "HTTP/1.1" | "HTTP/2" | "HTTP/*"
status
= <[0-9]+>
request-section
response-section
multipart-form-data-section
multipart-form-data-param
= file-param | param
file-param
file-value
file-contenttype
= <(alphanum | "/" | ";" | "=" | " ")+ without leading/trailing space>
= <(alphanum | "!" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*" | "+"
| "-" | "." | "/" | ":" | "<" | "=" | ">" | "?" | "@" | "["
| "]" | "^" | "_" | "`" | "~" )* >
query
main-query
status-query
= "status"
header-query
body-query
= "body"
xpath-query
jsonpath-query
regex-query
variable-query
duration
= "duration"
sha256-query
= "sha256"
bytes-query
= "bytes"
subquery
regex-subquery
count-subquery
= "count"
predicate
predicate-func
= equal-predicate
| not-equal-predicate
| greater-predicate
| greater-or-equal-predicate
| less-predicate
| less-or-equal-predicate
| start-with-predicate
| end-with-predicate
| contain-predicate
| match-predicate
| exist-predicate
| include-predicate
| integer-predicate
| float-predicate
| boolean-predicate
| string-predicate
| collection-predicate
| not-equal-predicate
| greater-predicate
| greater-or-equal-predicate
| less-predicate
| less-or-equal-predicate
| start-with-predicate
| end-with-predicate
| contain-predicate
| match-predicate
| exist-predicate
| include-predicate
| integer-predicate
| float-predicate
| boolean-predicate
| string-predicate
| collection-predicate
equal-predicate
not-equal-predicate
start-with-predicate
end-with-predicate
contain-predicate
match-predicate
exist-predicate
= "exists"
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
variable-name
= <(alphanum | "_" )+>
escaped-char
unicode-char
raw-string
base64
= "base64," <base64 encoding with optional whitesp/padding> ";"
comment
= "#" <any characters except newline - does not end with sp>
newline
= "\n" | "\r\n"
sp
= " " | "\t"
filename
= <(alphanum | ".")+>
integer
= <-?[1-9][0-9]*>