Package org.ossreviewtoolkit.utils.ort
Object OkHttpClientHelper
-
- All Implemented Interfaces:
-
org.apache.logging.log4j.kotlin.Logging
public class OkHttpClientHelper implements LoggingA helper class to manage OkHttp instances backed by distinct cache directories.
-
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerHTTP_TOO_MANY_REQUESTSprivate final KotlinLoggerloggerpublic final static OkHttpClientHelperINSTANCE
-
Method Summary
Modifier and Type Method Description final OkHttpClientbuildClient(Function1<OkHttpClient.Builder, Unit> block)Build a preconfigured client that uses a cache directory inside the ORT data directory. -
-
Method Detail
-
buildClient
final OkHttpClient buildClient(Function1<OkHttpClient.Builder, Unit> block)
Build a preconfigured client that uses a cache directory inside the ORT data directory. Proxy environment variables are by default respected, but the client can further be configured via the block.
-
-
-
-