-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: allow health check endpoint to respond to HEAD requests #4310
Comments
Hello @james2doyle , Would there be a specific use case where the current |
I'm using a 3rd party package to check for an Internet connection in a
Flutter app.
Basically the plug-in checks an array of given URLs on an interval. One of
the URLs I added to check was the health endpoint.
But because that endpoint can't respond to a HEAD request, it returns a
404. Which is not in the 200 range and it's considered an error.
Ideally a HEAD request would return an empty body. Unless a range header
was specified. And so it can be a lightweight way to check if the server is
up.
Does that make sense? Sorry if it's a bit convoluted
…On Thu, Feb 8, 2024, 5:02 PM Oluwaseun Oyebade ***@***.***> wrote:
Hello @james2doyle <https://github.com/james2doyle> ,
Would there be a specific use case where the current GET request wouldn't
be the ideal (work as intended)?
—
Reply to this email directly, view it on GitHub
<#4310 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK37GGT4ZHY4XQFHHZVO4DYSVYQPAVCNFSM6AAAAABC65G7OKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVGE3TAMBSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
ganigeorgiev
added a commit
that referenced
this issue
Feb 10, 2024
Support for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm currently using that endpoint to check the status of my server on Pockethost. Currently, it looks like
/api/health
will respond toHEAD
requests with 404.I think it would be ideal if it just responded with a
2xx
code instead of 404. And ideally an empty body.The text was updated successfully, but these errors were encountered: