Package com.slack.api.util.http
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 Summary
Fields Modifier and Type Field Description static String
USER_AGENT_PREFIX
-
Constructor Summary
Constructors Constructor Description UserAgentInterceptor(Map<String,String> additionalInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
buildDefaultUserAgent(Map<String,String> additionalInfo)
okhttp3.Response
intercept(okhttp3.Interceptor.Chain chain)
-
-
-
Field Detail
-
USER_AGENT_PREFIX
public static final String USER_AGENT_PREFIX
- See Also:
- Constant Field Values
-
-
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 interfaceokhttp3.Interceptor
- Throws:
IOException
-
-