-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add Response.isClosed() #1008
Add Response.isClosed() #1008
Conversation
Signed-off-by: Nicolas NESMON (NicoNes) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for this contribution!
I'd like to propose that we add this to 3.1 already as it does not change the API in an incompatible way thanks to the default implementation. Speaking of the default implementation I'd like to kindly ask all vendors to override it using an implementation that works with higher performance than the default solution. Last but not least I am kindly asking for TCK coverage. |
@mkarg do you want me to add somehing as follow in the doc ?
|
I do not see a need for this, actually. |
@NicoNes If you like to contribute it: For this feature we need a note in the "Changes since" section of the spec, an example in the examples folder would be great, and the TCK needs to test that the actual implementation provided by the vendor works just as correct as your default implementation. |
That's required only for changes to the spec document.
Given the simplicity of this (just a convenience method), more of a nice to have IMO. |
Okay, let's rephrase: It would be nice to have it, so users know about its existence and usage. :-) |
@NicoNes The PR has all the necessary approvals to be merged. |
This PR is the follow-up to the issue and discussion we had with @ronsigal.
To sum up it was about adding a method in the
Response
class to know when a response instance is closed. So that we no longer need to write code like:but instead:
I agree that the default implementation I proposed is a bit weird, not intuitive etc . I did it so that vendors don't need to make changes on their side.
I'm OK to remove it if you think it's not necessary.
Thanks