Class UserAgentInterceptor

java.lang.Object
com.slack.api.util.http.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.
  • Field Details

  • Constructor Details

    • UserAgentInterceptor

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

    • 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