Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnab-developer/arnabdeveloper.httphealthcheck
HTTP web app health check
https://github.com/arnab-developer/arnabdeveloper.httphealthcheck
csharp dotnet nuget
Last synced: 20 days ago
JSON representation
HTTP web app health check
- Host: GitHub
- URL: https://github.com/arnab-developer/arnabdeveloper.httphealthcheck
- Owner: Arnab-Developer
- License: mit
- Created: 2021-05-07T11:45:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T04:08:33.000Z (over 2 years ago)
- Last Synced: 2024-11-16T09:30:50.232Z (3 months ago)
- Topics: csharp, dotnet, nuget
- Language: C#
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP health check
This is a library to check health of HTTP endpoint. It has been hosted in
[NuGet](https://www.nuget.org/packages/ArnabDeveloper.HttpHealthCheck/).
Use below command to install this in your .NET application.```
dotnet add package ArnabDeveloper.HttpHealthCheck
```Use any HTTP endpoint to check their health.
```csharp
IHttpClientFactory httpClientFactory; // Use ASP.NET DI to build this
IHealthCheck healthCheck = new HealthCheck(httpClientFactory);
string urlToCheck = "";
bool isApiHealthy = await healthCheck.IsHealthyAsync(urlToCheck);
if (isApiHealthy)
{
// URL is healthy
}
else
{
// URL is unhealthy
}
```There is a
[dashboard app](https://github.com/Arnab-Developer/HttpHealthCheckDashboard)
which uses the library to check health of some http endpoints. This is to show
how you can use this library in your app.