Extracts¶
Extracts capture values from the request and make them available as named tokens in the target template.
How they work¶
Each extract has:
| Property | Description |
|---|---|
| Name | The token name used in the target template, e.g. productId |
| Expression | A string expression evaluated against the request |
Extracts are evaluated after the match expression passes. If any extract throws an error, the rule is skipped and the next rule is evaluated.
An extract that returns "" (for example from a missing map key) does not cause the rule to be skipped — the rule matches, but the token in the target template resolves to an empty string.
Examples¶
Capture a path segment:
Used in template as{productId}.
Capture and transform:
Map a path segment to a value:
If the key is not in the map, the extract value is"" and the Tester will show a warning explaining the miss.
Capture a regex group:
Capture a query parameter:
Diagnosing empty extracts¶
If a target URL contains an unexpected empty segment, check the Tester's Evaluation Steps table. Extracts with empty values caused by a map miss are highlighted in amber with a message explaining which map and key were involved.