We can use both JavaRegex and ‘=’ sign to compare strings in condition folow. Which is the best situation to use JavaRegex in the flow conditions.
@Amar N ,
- It’s simple, “=” operator is used for comparing string to string. like ‘api’ = ‘api’
Below condition will match only if pathsuffix is “/cat” ,
<Condition>(proxy.pathsuffix = "/cat")</Condition>
- JavaRegex is used for pattern matching like,
<Condition>(proxy.pathsuffix JavaRegex "/ca?t")</Condition>
GET http://artomatic-test.apigee.net/matchtest/cat - TRUE
GET http://artomatic-test.apigee.net/matchtest/ct - TRUE
Find more about same here.
1 Like