Do you know Visual Studio has this nice feature to send HTTP Requests using .http files. It's actually pretty neat.
We just have to create a file with .http extension.
![]() |
.http Files in Action |
Hope this helps!
Happy Coding.
Do you know Visual Studio has this nice feature to send HTTP Requests using .http files. It's actually pretty neat.
We just have to create a file with .http extension.
![]() |
.http Files in Action |
Hope this helps!
Happy Coding.
Azure Durable Functions now supports .NET 7.0 running in the Isolated worker process. It's still in it's preview stage, but it's super exciting.
In this post, let's see how we can get ourselves started in Azure Durable Functions in Azure Functions .NET Isolated Worker Process.
First, after creating a Function App that targets .NET 7 Isolated functions worker, we need to install the NuGet package: Microsoft.Azure.Functions.Worker.Extensions.DurableTask. Make sure you have checked Included prerelease checkbox if you are trying to install the package through Visual Studio NuGet Package Manager.
|
Microsoft.Azure.Functions.Worker.Extensions.DurableTask |
using Microsoft.Azure.Functions.Worker; using Microsoft.Azure.Functions.Worker.Http; using Microsoft.DurableTask; using Microsoft.Extensions.Logging; namespace FunctionApp1; public class Function1 { [Function(nameof(TriggerHello))] public async Task<HttpResponseData> TriggerHello([HttpTrigger(AuthorizationLevel.Anonymous, "get")] HttpRequestData req, [DurableClient] DurableClientContext durableContext, FunctionContext executionContext) { ILogger logger = executionContext.GetLogger(nameof(Function1)); string instanceId = await durableContext.Client.ScheduleNewOrchestrationInstanceAsync(nameof(HelloPersonOrchestrator)); logger.LogInformation("Created new orchestration with instance ID = {instanceId}", instanceId); return durableContext.CreateCheckStatusResponse(req, instanceId); } [Function(nameof(HelloPersonOrchestrator))] public static async Task<string> HelloPersonOrchestrator([OrchestrationTrigger] TaskOrchestrationContext context, FunctionContext executionContext) { ILogger logger = executionContext.GetLogger(nameof(HelloPersonOrchestrator)); string result = await context.CallActivityAsync<string>(nameof(SayHello), "John Doe") + " "; result += await context.CallActivityAsync<string>(nameof(SayHello), "Jane Doe") + " "; result += await context.CallActivityAsync<string>(nameof(SayHello), "Joe Bloggs") + " "; result += await context.CallActivityAsync<string>(nameof(SayHello), "Fred Bloggs"); logger.LogInformation("HelloPersonOrchestrator says: {output}", result); return result; } [Function(nameof(SayHello))] public static string SayHello([ActivityTrigger] string name, FunctionContext executionContext) { ILogger logger = executionContext.GetLogger(nameof(SayHello)); logger.LogInformation("Saying hello to {name}", name); return $"Hello {name}!"; } }
|
Output |
Hope this helps.
Happy Coding.