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.
Activity
bitwiseman commentedon Oct 4, 2021
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.
bitwiseman commentedon Nov 10, 2021
@Typraeurion
We won't be fixing this in
ObsoleteUrlFactory. In the next release (code already merged tomain) we've addedOkHttpGitHubConnectorwhich does not depend onObsoleteUrlFactoryallowing for use of interceptors.If you are using
OkHttpConnectorswitch toOkHttpGitHubConnector.Use OkHttpGitHubConnector so OkHttp interceptors see GitHub API calls (…
Use OkHttpGitHubConnector so OkHttp interceptors see GitHub API calls (…