The latest OkHttp (v2.7.5) is over three years old. The web has come a long way. There are a significant number of Jenkins JIRA and Zendesk issues related to using this ancient library in key plugins.
We should upgrade Jenkins to use OkHttp3.
- OkHttp 2.x and 3.x exist and separate packages and can run side-by-side without conflict. However, different versions of 3.x may be incompatible if clients are using obsolete classes/methods.
- OkHttp 3.12.2 is the last version that is reasonably compatible with 2.7.5. Upgrading will require some changes but not huge ones.
- OkHttp 3.13.1 has some notable incompatibilities with 2.7.5, but also some better defaults.
- OkHttp 3.14.1 removes UrlFactory which is a serious version-incompatible API change for several plugins.
Early exploration of this upgrade was started to test whether it would address issues such ass
Finding so far while using 3.12.2:
- okio v2.2.x is needed for okhttp3.
- Some special class loading settings are needed to get the right versions okhttp3 and okio to be loaded.
(Last updated May 29, 2019):
Please give this version of the plugin a try: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/github-branch-source/2.5.7-rc892.e46ec862f6f7/