Send Binary Content
This procedure shows how to create a flow to send binary content.
The connectivity::rest parameter implicitly determines the response
content handling based on payload. If the action's input schema defines input type as binary
and if the binary object is body for connectivity::rest, the
connectivity::rest parameter treats as a binary stream.
Complete sample
code:
"flows": {
"UploadFileFlow" : {
"id": "UploadFileFlow",
"description": "UploadFileFlow",
"version": "0.1",
"start": "startState",
"specVersion": "0.8",
"functions": [
{
"name": "httpOutbound",
"operation": "connectivity::rest",
"type": "custom"
}
],
"states": [
{
"actions": [
{
"functionRef": {
"refName": "httpOutbound",
"arguments": {
"uri": "${.connectionProperties.baseURL + \"/orders\"}",
"method": "POST",
"body": "${ .input.File}"
}
},
"actionDataFilter": {
"results": "${ { body: .body, headers: .headers } }",
"toStateData": "${ .output }"
}
}
],
"name": "startState",
"type": "operation",
"end": true
}
]
}
}