Skip to content

Commit

Permalink
feat: Add Microsoft.Extensions.Http.Resilience package
Browse files Browse the repository at this point in the history
This commit adds the `Microsoft.Extensions.Http.Resilience` package to the project. It also modifies the `Program.cs` file to include the `AddStandardResilienceHandler()` method call, which configures the HTTP client with a standard resilience handler.
  • Loading branch information
SakuraIsayeki committed Jul 2, 2024
1 parent 2f35e3f commit 06e966c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Nodsoft.Mirador.Functions/Nodsoft.Mirador.Functions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="8.0.6" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageReference Include="Throw" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion Nodsoft.Mirador.Functions/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
.ConfigureHttpClient(client =>
{
client.DefaultRequestHeaders.UserAgent.ParseAdd($"NSYS-Mirador/{miradorVersion} (+https://github.com/Nodsoft/Mirador; mailto:[email protected])");
});
})
.AddStandardResilienceHandler();
})
.Build();
Expand Down

0 comments on commit 06e966c

Please sign in to comment.