You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I’ve been troubleshooting why my custom network interceptor that I added to the OkHttpClient was never called. After tracing through the code, I found that ObsoleteUrlFactory.buildCall is explicitly removing all interceptors set on the OkHttpClient and adding its own:
Generally speaking, this is a known limitation of ObsoleteUrlFactory. This is another reason we need to implement #1085 so we can stop using the deprecated/obsolete code path.
You are welcome to take a swing at implementing a fix in ObsoleteUrlFactory, but I suspect there was a good reason why the original implementation does not allow that. If you choose to try fixing you will need to implement extensive testing in that area.
If you are interested in working on #1085, let's talk over there.
@Typraeurion
We won't be fixing this in ObsoleteUrlFactory. In the next release (code already merged to main) we've added OkHttpGitHubConnector which does not depend on ObsoleteUrlFactory allowing for use of interceptors.
If you are using OkHttpConnector switch to OkHttpGitHubConnector.
Describe the bug
I’ve been troubleshooting why my custom network interceptor that I added to the OkHttpClient was never called. After tracing through the code, I found that ObsoleteUrlFactory.buildCall is explicitly removing all interceptors set on the OkHttpClient and adding its own:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Application displays “Intercepting network call from OkHttp” when
getCurrentUser
is called.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: