Package zendesk.core

Class UserAgentHeaderInterceptor



  • public class UserAgentHeaderInterceptor
    extends java.lang.Object
    This request interceptor will add the user agent header to all requests that are made through the means of a retrofit2.Retrofit. This will overwrite any user-agent headers from earlier interceptors

    The formatted header is Zendesk-SDK/{{version}} Android/{{api level}} Variant/{{variant}}

    For Support SDk 2.1.1 on android 5.0 the header would be Zendesk-SDK/2.1.1 Android/21 Variant/Support

    • Constructor Summary

      Constructors 
      Constructor and Description
      UserAgentHeaderInterceptor(java.lang.String version, java.lang.String variant) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Response intercept(Chain chain) 
      • Methods inherited from class java.lang.Object

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

      • UserAgentHeaderInterceptor

        public UserAgentHeaderInterceptor(java.lang.String version,
                                          java.lang.String variant)
    • Method Detail

      • intercept

        public Response intercept(Chain chain)
                           throws java.io.IOException
        Throws:
        java.io.IOException