I am trying to modernize a couple azure functions, and thought of integrating them with latest .NET Core types.
Here is a simple function:
[Function("Function")]
public IResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
{
return TypedResults.Ok(DateTime.Now);
}
I was expecting this to return, in this case the date. But instead response content is blank.
Preferably, it should also work with Task<IResult>
but that doesn’t work either.
Thanks