Skip to content

URI argument and value fields

The Cloudflare Rules language includes URI argument and value fields associated with HTTP requests. Many of these fields return arrays containing the respective values.

The Cloudflare Rules language supports these URI argument and value fields.

http.request.uri.args

http.request.uri.args Map<Array<String>>

Represents the HTTP URI arguments associated with a request as a Map (associative array).

When an argument repeats, the array contains multiple items in the order they appear in the request.

The values are not pre-processed and retain the original case used in the request.

  • Decoding: no decoding performed
  • Non-ASCII: preserved

Example:

any(http.request.uri.args["search"][*] == "red+apples")

Example value:

{"search": ["red+apples"]}

http.request.uri.args.names

http.request.uri.args.names Array<String>

Represents the names of the arguments in the HTTP URI query string. The names are not pre-processed and retain the original case used in the request.

When a name repeats, the array contains multiple items in the order that they appear in the request.

  • Decoding: no decoding performed
  • Non-ASCII: preserved

Example:

any(http.request.uri.args.names[*] == "search")

Example value:

["search"]

http.request.uri.args.values

http.request.uri.args.values Array<String>

Represents the values of arguments in the HTTP URI query string. The values are not pre-processed and retain the original case used in the request. They are in the same order as in the request.

Duplicated values are listed multiple times.

  • Decoding: no decoding performed
  • Non-ASCII: preserved

Example:

any(http.request.uri.args.values[*] == "red+apples")

Example value:

["red+apples"]

raw.http.request.uri.args

raw.http.request.uri.args Map<Array<String>>

Contains the same field values as http.request.uri.args.

raw.http.request.uri.args.names

raw.http.request.uri.args.names Array<String>

Contains the same field values as http.request.uri.args.names.

raw.http.request.uri.args.values

raw.http.request.uri.args.values Array<String>

Contains the same field values as http.request.uri.args.values.