I'm trying to write an Azure function that will output a blob, as well as return an HTTP response to the caller.
The function.json part is pretty simple -
{
"name": "$return",
"type": "http",
"direction": "out"
},
{
"type": "blob",
"name": "outputBlob",
"path": "outcontainer/{rand-guid}",
"connection": "STORAGE",
"direction": "out"
}
But I'm running into issues accessing the blob output in my actual function code. Based on examples, it should look like this:
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req,
out string outputBlob, TraceWriter log)
{
//proccess request and create blob output
}
As you might expect, this throws an error, because you can't have an out parameter in an async call. I don't want to make the call synchronous, as we expect fairly high volume.
Is it even possible to have an HTTP output with a blob output? If so, how would you do it?