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

middleware: add method to WrapResponseWriter for getting response writing time #890

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vasayxtx
Copy link
Contributor

This PR introduces a new method, ElapsedWriteTime(), to the middleware.WrapResponseWriter. This addition is particularly useful in scenarios where clients are slow or responses are large, necessitating a measure of the time taken to write the response.

Please note, that this change may break backward compatibility. An alternative could be to introduce a separate interface containing only this new method. However, this would require developers to perform type assertions in the client code, which may reduce clarity. So, your feedback on this approach is appreciated.

@vasayxtx vasayxtx force-pushed the wrap-response-writer-elapsed-time branch from 461ac32 to 1bfa1de Compare December 28, 2023 20:55
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

Successfully merging this pull request may close these issues.

None yet

1 participant