Class OkHttpUtils
java.lang.Object
io.jenkins.plugins.restlistparam.util.OkHttpUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic okhttp3.CacheControl
getCacheControl
(Integer minutesCached) static okhttp3.OkHttpClient
getClientWithProxyAndCache
(String httpEndpoint) Builds a OkHTTP client that respects any proxy set in the Jenkins 'Plugin Manager' and offers a response cache.
-
Method Details
-
getClientWithProxyAndCache
Builds a OkHTTP client that respects any proxy set in the Jenkins 'Plugin Manager' and offers a response cache. A proxy will only be applied if the host of thehttpEndpoint
is NOT part of the noProxy values. The response cache is only present if the creation on disk is possible, otherwise there is none- Parameters:
httpEndpoint
- the host of the endpoint will get looked up against the noProxy values- Returns:
- OkHttpClient setup with an appropriate httpProxy value and response cache
-
getCacheControl
-