healthcheck-dotnet-http

Implement a custom IHealthCheck using IHttpClientFactory to verify external HTTP endpoints.

12|2|Updated May 4, 2020
One-click install
npx skills add https://github.com/hoangnh2412/jarvis --skill healthcheck-dotnet-http
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: healthcheck-dotnet-http
Source: https://github.com/hoangnh2412/jarvis/tree/main/.opencode/skills/healthcheck-dotnet/providers/http
Command: npx skills add https://github.com/hoangnh2412/jarvis --skill healthcheck-dotnet-http

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When building .NET backend services, you need to confirm that external dependent APIs and services are reachable and healthy before marking your service as ready to accept traffic, preventing routing requests to a service that cannot fulfill them due to downstream outages.

Core Features & Use Cases

  • Custom IHealthCheck Implementation: Uses IHttpClientFactory to send GET requests to configured external endpoints, returning a healthy status if the endpoint responds with a success HTTP status code.
  • Robust Error Handling: Returns an unhealthy status if the endpoint returns a non-success status code or is unreachable due to network issues, with optional exception details for debugging.
  • Use Case: For a .NET microservice that relies on a third-party payment processing API, use this skill to add a readiness probe that verifies the payment API is accessible before the service starts handling user requests.

Quick Start

Use the healthcheck-dotnet-http skill to add a readiness check for your external payment API endpoint configured in your application settings.

Frequently Asked Questions about healthcheck-dotnet-http

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an HTTP readiness probe for external APIs in ASP.NET Core?

An HTTP readiness probe in .NET verifies external service availability by sending GET requests via IHttpClientFactory, returning a healthy status only when the endpoint responds with a success HTTP status code, preventing traffic routing to unready services.

What is the best way to check if a downstream API is reachable in .NET microservices?

Checking downstream API reachability in .NET microservices is best handled by an HTTP health check that sends a GET request to the external endpoint, returning an unhealthy status if the service is unreachable or returns a non-success HTTP status code.

Does the .NET http healthcheck return unhealthy when a dependent API returns a non-success status code?

Yes, the .NET HTTP healthcheck returns an unhealthy status when a dependent API returns a non-success status code or is unreachable due to network issues, with optional exception details provided for debugging the failure.

Can I use IHttpClientFactory with ASP.NET Core health checks to verify external endpoints?

You can use IHttpClientFactory with ASP.NET Core health checks to verify external endpoints by implementing a custom IHealthCheck that sends GET requests, ensuring your service only accepts traffic when dependencies are reachable and responding successfully.

Why does my ASP.NET Core service accept requests when an external dependency is down?

Your ASP.NET Core service accepts requests during downstream outages because it lacks an HTTP readiness probe, which uses IHttpClientFactory to verify external API availability and return an unhealthy status if the endpoint is unreachable before traffic is routed.