Class UserAgentInterceptor

  • All Implemented Interfaces:
    okhttp3.Interceptor

    public class UserAgentInterceptor
    extends Object
    implements okhttp3.Interceptor
    An OkHttpClient interceptor that adds the SDK User-Agent to all the outgoing HTTP requests by this SDK.
    • Constructor Detail

      • UserAgentInterceptor

        public UserAgentInterceptor​(Map<String,​String> additionalInfo)
    • Method Detail

      • buildDefaultUserAgent

        public static String buildDefaultUserAgent​(Map<String,​String> additionalInfo)
      • intercept

        public okhttp3.Response intercept​(okhttp3.Interceptor.Chain chain)
                                   throws IOException
        Specified by:
        intercept in interface okhttp3.Interceptor
        Throws:
        IOException