public async Task <IActionResult> RunAsync( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); var todoString = await new StreamReader(req.Body).ReadToEndAsync().ConfigureAwait(false); var todo = JsonSerializer.Deserialize <Todo>(todoString); var id = await todoManager.AddTodoAsync(todo).ConfigureAwait(false); return(new CreatedResult(string.Empty, id)); }