Package zendesk.core

Class CustomNetworkConfig



  • public abstract class CustomNetworkConfig
    extends java.lang.Object
    Abstract class for customising network configuration, to be used by Zendesk SDKs in conjunction with RestServiceProvider.createRestService(Class, CustomNetworkConfig). It provides a way to add custom configuration to the OkHttpClient and Retrofit objects used to power a generated Retrofit service API class, through implementing the configuration methods. Both are empty by default. This class should not be used directly by integrators.
    • Constructor Detail

      • CustomNetworkConfig

        public CustomNetworkConfig()
    • Method Detail

      • configureOkHttpClient

        public void configureOkHttpClient(OkHttpClient.Builder builder)
        Add custom configuration to the OkHttpClient.Builder which will be used by the object returned by RestServiceProvider.createRestService(Class, CustomNetworkConfig).
        Parameters:
        builder - a OkHttpClient.Builder with starting configuration from the Zendesk Core SDK.
      • configureRetrofit

        public void configureRetrofit(Retrofit.Builder builder)
        Add custom configuration to the Retrofit.Builder which will be used by the object returned by RestServiceProvider.createRestService(Class, CustomNetworkConfig).
        Parameters:
        builder - a Retrofit.Builder with starting configuration from the Zendesk Core SDK.