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 Interceptors to add EventListeners. #7447
base: master
Are you sure you want to change the base?
Conversation
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 but needs a Jesse review before merging
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Benoît Quenaudon <oldering@gmail.com>
# Conflicts: # okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
@swankjesse any thoughts on this? |
@swankjesse ping, it would be good to get this into an alpha for bridge integrations. |
I’m not sold on this. I think the top-level goal is reasonable, but this implementation isn’t consistent with our other But then I don’t like other side-effects this can trigger. Like if the interceptor runs 2x, it’ll add the listener 2x. I think if we really wanted this behavior, we’d be better off adding interceptors to Perhaps we start with some use cases and build the API to address them, rather than taking interceptors and trying to make them more powerful. |
Ok, will rework. |
#fixes #7164