I am developing an Azure Durable Function using .NET 7. The HttpTrigger receives a payload in the POST method.
[Function("CreateCandidateProfileOrchestration_HttpStart")]
public static async Task<HttpResponseData> HttpStart(
[HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequestData req,
[DurableClient] DurableTaskClient client,
FunctionContext executionContext)
{
}
The payload should be passed to Orchestration method as parameter:
[Function(nameof(CreateCandidateProfileOrchestration))]
public static async Task<List<string>> RunOrchestrator(
[OrchestrationTrigger] TaskOrchestrationContext context)
{
}
What would be a standard way to achieve that?
Any example code would be appreciated.
Thanks. Ruhul
I tried the code below to pass a parameter from an Http Trigger to the Orchestration function.
Code :
Output in Postman:
Follow these steps to get the output in Postman:
URL:
JSON body:
Output data in Postman:
Terminal Output:
I received the payload details in the output below.