diff --git a/demo_templates/http.yaml b/demo_templates/http.yaml index 6c7acee2..5dcda2a1 100644 --- a/demo_templates/http.yaml +++ b/demo_templates/http.yaml @@ -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" }}'