IsolatedFunctionsAuthentication
IsolatedFunctionsAuthentication copied to clipboard
FunctionContextExtensions.cs
First, thank you so much for putting this example out there. Very helpful.
You may already be aware but with a new update of the SDK reflection isn't necessary anymore in FunctionContextExtensions.cs:
public static void SetHttpResponseStatusCode(
this FunctionContext context,
HttpStatusCode statusCode)
{
var httpReqData = context.GetHttpRequestDataAsync().GetAwaiter().GetResult();
if (httpReqData != null)
{
var newResponse = httpReqData.CreateResponse();
newResponse.StatusCode = statusCode;
// Update invocation result.
context.GetInvocationResult().Value = newResponse;
}
return;
}
The above should be a drop in replacement for your original code w/ reflection. azure-functions-dotnet-worker issue/comment. You will need to upgrade the SDK to Version 1.8.0-preview3.
Nice! Will be updating the sample as soon as I have the chance. 😁
Hi , When we expect this version 1.8.0-preview3 will get release. please let us know at least expected date