Skip to content
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

Allow HEAD request #18

Closed
perezzini opened this issue Nov 15, 2022 · 3 comments
Closed

Allow HEAD request #18

perezzini opened this issue Nov 15, 2022 · 3 comments

Comments

@perezzini
Copy link

Hello,

I was wondering if this library can, somehow, allow HEAD requests. I can see that FastAPI, for the moment, does not automatically support HEAD method for GET routes (see: tiangolo/fastapi#1773).

Thanks in advance.

@perezzini
Copy link
Author

(Think this is important given that some healthcheck utils make HEAD requests, instead of GET requests by default)

@Kludex
Copy link
Owner

Kludex commented Nov 15, 2022

I can see that FastAPI, for the moment, does not automatically support HEAD method for GET routes (see: tiangolo/fastapi#1773).

If you go further on that issue, you'll see that I've implemented two PRs to add HEAD there. 😅

You can just manually add the methods=["GET", "HEAD"], there's nothing that needs to be added on the fastapi-health itself.

@perezzini
Copy link
Author

Yes! Haven't noticed, sorry! 😅. Thanks for your reply @Kludex and for your contribution implementing fastapi-health.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants