Skip to content

Commit 6a96d7e

Browse files
committed
Add toString example
1 parent 5e59eab commit 6a96d7e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

demo_templates/http.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,15 @@
181181
Access-Control-Allow-Origin: http://localhost:9991
182182
Access-Control-Allow-Methods: POST, GET, OPTIONS
183183
Access-Control-Allow-Headers: Content-Type
184+
185+
- key: condition-on-http-body
186+
kind: Behavior
187+
expect:
188+
condition: '{{ .HTTPBody | jsonPath "foo" | toString | eq "123" }}'
189+
http:
190+
method: POST
191+
path: /query_body
192+
actions:
193+
- reply_http:
194+
status_code: 200
195+
body: '{{ .HTTPBody | jsonPath "foo" }}'

0 commit comments

Comments
 (0)