-
-
Notifications
You must be signed in to change notification settings - Fork 152
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 specify WriteTimeout per router endpoint? #620
Comments
@j0urneyK there is an example of how you can do this using the This might be a nice thing to add as an option to |
Thank you so much for the detailed response. Thanks to your explanation, I was able to confirm that the Write Deadline works properly in the I also agree that adding I would like to work on this if possible, but there are a couple of additional things I would like to discuss before doing so. First, I understood your mention of a situation where an error is returned if the This seems to be a similar consideration to why the In this regard, would it be reasonable to consider logging a warning or error-level message when an error occurs, given that the code execution happens during the request processing? If you think this is okay, i might want to consider treating ctx.SetReadDeadline the same way. Additionally, the following suggestion pertains to a different aspect than
|
I want to specify a
WriteTimeout
for each router endpoint, but it seems likehuma.Operation
only allows setting theBodyReadTimeout
.Due to current business requirements, we have set a large
WriteTimeout
for the HTTP server itself, but there are some endpoints where theWriteTimeout
needs to be shorter.The text was updated successfully, but these errors were encountered: