Open tolot27 opened 3 years ago
The best practice in OkHttp 3 is to create a single OkHttpClient instance and share it throughout the application. Requests that needs a customized client should call OkHttpClient.newBuilder() on that shared instance. This allows customization without the drawbacks of separate connection pools.
Some classes still using
com.squareup.okhttp
(v2.x) which is deprecated since 2016. Many others using the newer v3.x. Using both major versions within a project can cause strange problems like https://github.com/square/okhttp/issues/2705. We should migrate the code using the deprecated version to v3.