private OkHttpConnector connector ( GitHubServerConfig config ) { OkHttpClient client = new OkHttpClient ( ) . setProxy ( getProxy ( defaultIfBlank ( config . getApiUrl ( ) , GITHUB_URL ) ) ) ; if ( config . getClientCacheSize ( ) > 0 ) { Cache cache = toCacheDir ( ) . apply ( config ) ; client . setCache ( cache ) ; } return new OkHttpConnector ( new OkUrlFactory ( client ) ) ; }
okHttp connector to be used as backend for GitHub client . Uses proxy of jenkins If cache size > 0 uses cache