This is reference to the below ask
https://docs.microsoft.com/en-us/answers/questions/533843/how-to-pass-output-of-one-azure-function-to-anothe.html
I tried the solution given in the approach but struck at below error.
Thanks SamaraSoucy,
I tried calling second azure function from first one. Whereas I am getting null input to second function. And sometimes it get struck with queue and getting 500 error
function1:
$varepo = "vasamplerepo"
$vbrepo = "vbsamplerepo"
$body = @"
{
"varepo": "$varepo",
"vbrepo": "$vbrepo",
"Name" : "$name",
"message" : "invoke second function"
}
"@
$function2uri = "https://functionapp.azurewebsites.net/api/HttpTrigger2?c=="
$response = Invoke-RestMethod -Uri $function2uri -Body $body -Method Post
Write-Host $response
Associate values to output bindings by calling 'Push-OutputBinding'.
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = $response
})
2nd function:
$outname = $Request.Body.name
$va = $Request.Body.varepo
$vb = $Request.Body.vbrepo
write-Host "va is $va"
write-Host "vb is $vb"
write-Host "outname is $outname"
$body = @"
{
"va": "$va",
"vb": "$vb"
"outname" : "$outname"
}
"@
Associate values to output bindings by calling 'Push-OutputBinding'.
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = $body
})
We also tried implementing logicapps for this case whereas I am unable to pass output of one httpfunction to another.
Do we have any sample code for this to pass output from one function to another?
I got struck at below issue.