public class OkHttpUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static 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.
|
public static okhttp3.OkHttpClient getClientWithProxyAndCache(String httpEndpoint)
httpEndpoint is NOT part of the noProxy values.
The response cache is only present if the creation on disk is possible, otherwise there is nonehttpEndpoint - the host of the endpoint will get looked up against the noProxy valuespublic static okhttp3.CacheControl getCacheControl(Integer minutesCached)
Copyright © 2020. All rights reserved.