Skip to content

Commit

Permalink
better macro examples that do not use size
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminchan committed Feb 21, 2024
1 parent 73d2700 commit 65ec625
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/http/traffic-policy/expressions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ Returns a list of the query parameter values from the request URL for the specif

<ConfigExample
config={{
expressions: ["size(getQueryParam('q')) == 0"],
expressions: ["'asc' in getQueryParam('sort')"],
}}
/>

Expand Down Expand Up @@ -450,9 +450,7 @@ Returns a list of header values for the provided key on the response. Header key

<ConfigExample
config={{
expressions: [
"size(getResHeader('Content-Type').filter(v, v.matches('application/json'))) > 0",
],
expressions: ["'application/json' in getResHeader('Content-Type')"],
}}
/>

Expand Down

0 comments on commit 65ec625

Please sign in to comment.