Class CustomSlackHttpClient

  • All Implemented Interfaces:
    AutoCloseable

    public class CustomSlackHttpClient
    extends com.slack.api.util.http.SlackHttpClient
    Slack-api-client use the OkHttpClient v4.x.x We need to override the SlackHttpClient to force the function postJsonBody to work with the v3.x.x
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      okhttp3.Response postJsonBody​(String url, Object obj)  
      • Methods inherited from class com.slack.api.util.http.SlackHttpClient

        buildOkHttpClient, buildOkHttpClient, buildSlackHttpClient, buildSlackHttpClient, close, delete, get, getConfig, patchCamelCaseJsonBodyWithBearerHeader, postCamelCaseJsonBodyWithBearerHeader, postForm, postFormWithAuthorizationHeader, postFormWithBearerHeader, postMultipart, putCamelCaseJsonBodyWithBearerHeader, runHttpResponseListeners, setConfig
    • Constructor Detail

      • CustomSlackHttpClient

        public CustomSlackHttpClient()
    • Method Detail

      • postJsonBody

        public okhttp3.Response postJsonBody​(String url,
                                             Object obj)
                                      throws IOException
        Overrides:
        postJsonBody in class com.slack.api.util.http.SlackHttpClient
        Throws:
        IOException