Skip to content

Commit a69e300

Browse files
committed
Added examples on how to reference request metadata
1 parent b07c045 commit a69e300

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

examples/misc/inputs.wf.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# The Inputs Workflow - simply prints the inputs it received, including body, query params and headers.
2+
#
3+
# Example: curl -XPUT -H "hello: world" http://$FISSION_ROUTER/fission-function/inputs?a=b
4+
apiVersion: 1
5+
output: Printer
6+
tasks:
7+
Printer:
8+
run: compose
9+
inputs: "{$.Invocation.Inputs}"

examples/whales/metadatawhale.wf.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ tasks:
55
PrefixedFortune:
66
run: fortune
77
inputs:
8-
header_prefix: "Whale says:"
8+
headers:
9+
# If the 'prefix' header is non-empty, we use that. Otherwise we default to "whale says"
10+
prefix: "{ $.Invocation.Inputs.headers.Prefix || 'Whale says: ' }"

0 commit comments

Comments
 (0)