Object OkHttpClientHelper

  • All Implemented Interfaces:

    
    public class OkHttpClientHelper
    
                        

    A helper class to manage OkHttp instances backed by distinct cache directories.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final OkHttpClient buildClient(Function1<OkHttpClient.Builder, Unit> block) Build a preconfigured client that uses a cache directory inside the ORT data directory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.