-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
How to use fasthttp TimeoutHandler #22
Comments
Hi @losingle, Do you need |
You could call to However, |
Very much looking forward to this feature. |
Here you have the feature: https://godoc.org/github.com/savsgio/atreugo#Atreugo.TimeoutPath 😄 Thanks for your contribution. |
How do I change the status code ? |
If you want to set a custom status code in response, use https://godoc.org/github.com/savsgio/atreugo#RequestCtx or |
I think you are supervising the timeout manually, right? with channels, selects, context or something similar. if it's truth, not use |
well, as if only timeout manually |
So, why do you need to change the status code when timeout? I see your PR valyala/fasthttp#589 in fasthttp. I think so, it's not recommended to return another status code if timeout |
Yes, normally, there is no need to change the status code, following the rules of HTTP. |
I saw that erik merged your PR, when release a new version of fasthttp i will add it in atreugo. ;) |
I've just release a new version v8.1.0 with |
We need to give the timeout request a specific status code
https://godoc.org/github.com/valyala/fasthttp#TimeoutHandler
TimeoutErrorWithCode is discouraged
The text was updated successfully, but these errors were encountered: