GotenbergSharpApiClient icon indicating copy to clipboard operation
GotenbergSharpApiClient copied to clipboard

Clarification and Proposal to Utilize HealthCheckUrl

Open kylepmanuel opened this issue 1 year ago • 1 comments

I noticed that the HealthCheckUrl property exists in the configuration but currently seems to be only set and not used. Could you clarify its intended purpose? If the URL is a legacy field or there are no updates planned for its use, I would like to propose the following changes:

  1. AddGotenbergHealthCheck: A service collection extension method that integrates with the standard ASP.NET Core health check framework.
  2. Optional Pre-Check in GotenbergSharpClient: Add an optional method on GotenbergSharpClient to perform a health pre-check against the HealthCheckUrl before sending any requests. This method will be available for developers to call as needed.

If allowed, I would be happy to implement and submit a pull request for these changes.

kylepmanuel avatar Sep 10 '24 16:09 kylepmanuel

  • Correct, that property isn't used by the client and can be removed.
  • I like the idea of the ASP.NET Healthcheck -- but I would release as a separate library. Feel free to make a PR.
  • I'm not sure about a "pre-check," as the request will fail either way—I don't see the benefit.

Jaben avatar Sep 27 '24 13:09 Jaben