Skip to content

Commit

Permalink
Add toString example
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzhuojie committed Apr 24, 2020
1 parent 5e59eab commit 6a96d7e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions demo_templates/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,15 @@
Access-Control-Allow-Origin: http://localhost:9991
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type

- key: condition-on-http-body
kind: Behavior
expect:
condition: '{{ .HTTPBody | jsonPath "foo" | toString | eq "123" }}'
http:
method: POST
path: /query_body
actions:
- reply_http:
status_code: 200
body: '{{ .HTTPBody | jsonPath "foo" }}'

0 comments on commit 6a96d7e

Please sign in to comment.