Last active
September 17, 2019 19:30
-
-
Save jesspanni/f34f86cea29155d3c366de45c998d51f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName("AsyncHttpFunction")] | |
public static async Task<IActionResult> RunAsync( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, | |
[OrchestrationClient] IDurableOrchestrationClient starter, | |
ILogger log) | |
{ | |
string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); | |
dynamic data = JsonConvert.DeserializeObject(requestBody); | |
string instanceId = await starter.StartNewAsync("Orchestration", (int)(data.secondsToWait ?? 60)).ConfigureAwait(false); | |
return starter.CreateCheckStatusResponse(req, instanceId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment