From 99f656e9c66685940679edca706a9ca2ab2a91d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Can=20Bak=C4=B1r?= Date: Wed, 7 Oct 2026 22:07:29 +0300 Subject: [PATCH 1/3] docs(dsl): document expression operators --- templates/reference/helper-functions.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/templates/reference/helper-functions.mdx b/templates/reference/helper-functions.mdx index ea0bcae..77effde 100644 --- a/templates/reference/helper-functions.mdx +++ b/templates/reference/helper-functions.mdx @@ -5,6 +5,22 @@ icon: "function" iconType: "solid" --- +## Operators + +Expressions in `{{ }}`, DSL matchers, extractors and variables support these operators: + +| Operator | Description | Example | Output | +| ------------------------------ | ----------------------------------------- | ------------------------------------- | ------ | +| `==` `!=` `>` `>=` `<` `<=` | Comparison | `status_code >= 200` | `true` | +| `=~` `!~` | Matches / does not match a regex | `body =~ "^h.*o$"` | `true` | +| `&&` `\|\|` `!` | Logical and, or, not | `status_code == 200 && len(body) > 3` | `true` | +| `in` | Value is in a list | `status_code in (200, 301)` | `true` | +| `+` `-` `*` `/` `%` `**` | Arithmetic; `+` also concatenates strings | `2 ** 10` | `1024` | +| `&` `\|` `^` `<<` `>>` `~` | Bitwise | `6 & 3` | `2` | +| `? :` | Ternary | `status_code == 200 ? "up" : "down"` | `up` | + +## Functions + Here is the list of all supported helper functions can be used in the RAW requests / Network requests. | Helper function | Description | Example | Output | From 17d60551d1ca83d0971caffb27588256d8720c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Can=20Bak=C4=B1r?= Date: Wed, 7 Oct 2026 22:12:10 +0300 Subject: [PATCH 2/3] docs(dsl): note when {{ }} expressions are evaluated --- templates/reference/helper-functions.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/reference/helper-functions.mdx b/templates/reference/helper-functions.mdx index 77effde..178cb48 100644 --- a/templates/reference/helper-functions.mdx +++ b/templates/reference/helper-functions.mdx @@ -19,6 +19,8 @@ Expressions in `{{ }}`, DSL matchers, extractors and variables support these ope | `&` `\|` `^` `<<` `>>` `~` | Bitwise | `6 & 3` | `2` | | `? :` | Ternary | `status_code == 200 ? "up" : "down"` | `up` | +In `{{ }}`, an expression is evaluated only when it uses a helper function or a variable, so `{{2 == 2}}` alone is kept as text. Variables are strings: convert them with `to_number` before arithmetic, for example `{{to_number(n) * 2}}`. + ## Functions Here is the list of all supported helper functions can be used in the RAW requests / Network requests. From b041af75d96c6e4e5b22cbf51bc472a9daa42770 Mon Sep 17 00:00:00 2001 From: Mzack9999 Date: Wed, 7 Oct 2026 22:32:02 +0200 Subject: [PATCH 3/3] fix examples --- templates/reference/helper-functions.mdx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/reference/helper-functions.mdx b/templates/reference/helper-functions.mdx index 178cb48..572de68 100644 --- a/templates/reference/helper-functions.mdx +++ b/templates/reference/helper-functions.mdx @@ -9,17 +9,17 @@ iconType: "solid" Expressions in `{{ }}`, DSL matchers, extractors and variables support these operators: -| Operator | Description | Example | Output | -| ------------------------------ | ----------------------------------------- | ------------------------------------- | ------ | -| `==` `!=` `>` `>=` `<` `<=` | Comparison | `status_code >= 200` | `true` | -| `=~` `!~` | Matches / does not match a regex | `body =~ "^h.*o$"` | `true` | -| `&&` `\|\|` `!` | Logical and, or, not | `status_code == 200 && len(body) > 3` | `true` | -| `in` | Value is in a list | `status_code in (200, 301)` | `true` | -| `+` `-` `*` `/` `%` `**` | Arithmetic; `+` also concatenates strings | `2 ** 10` | `1024` | -| `&` `\|` `^` `<<` `>>` `~` | Bitwise | `6 & 3` | `2` | -| `? :` | Ternary | `status_code == 200 ? "up" : "down"` | `up` | - -In `{{ }}`, an expression is evaluated only when it uses a helper function or a variable, so `{{2 == 2}}` alone is kept as text. Variables are strings: convert them with `to_number` before arithmetic, for example `{{to_number(n) * 2}}`. +| Operator | Description | Example | Output | +| ------------------------------ | ----------------------------------------- | ---------------------------------- | ------ | +| `==` `!=` `>` `>=` `<` `<=` | Comparison | `1 >= 1` | `true` | +| `=~` `!~` | Matches / does not match a regex | `"hello" =~ "^h.*o$"` | `true` | +| `&&` `\|\|` `!` | Logical and, or, not | `200 == 200 && len("abcd") > 3` | `true` | +| `in` | Value is in a list | `200 in (200, 301)` | `true` | +| `+` `-` `*` `/` `%` `**` | Arithmetic; `+` also concatenates strings | `2 ** 10` | `1024` | +| `&` `\|` `^` `<<` `>>` `~` | Bitwise | `6 & 3` | `2` | +| `? :` | Ternary | `200 == 200 ? "up" : "down"` | `up` | + +In `{{ }}`, an expression is evaluated only when it uses a helper function or a variable, so `{{2 == 2}}` alone is kept as text. Template values inside `{{ }}` are strings: convert them with `to_number` before arithmetic, for example `{{to_number(n) * 2}}`. ## Functions