Path: blob/dev/pkg/input/formats/testdata/ytt/ginandjuice.ytt.yaml
2866 views
#@ load("@ytt:data", "data")1#@ load("@ytt:json", "json")23#@ def get_value(key, default=""):4#@ if hasattr(data.values, key):5#@ return str(getattr(data.values, key))6#@ else:7#@ return default8#@ end9#@ end1011timestamp: 2024-02-20T19:24:13+05:3212url: https://ginandjuice.shop/users/313request:14#@yaml/text-templated-strings15raw: |+16POST /users/3 HTTP/1.117Host: ginandjuice.shop18Authorization: Bearer (@= get_value("token", "3x4mpl3t0k3n") @)19Accept-Encoding: gzip20Content-Type: application/x-www-form-urlencoded21Connection: close22User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.362324foo=(@= json.encode(data.values.foo) @)&bar=(@= get_value("bar") @)&debug=(@= get_value("debug", "false") @)2526