Update dependencies for 1.18.0 release (#1175)

This commit is contained in:
Wim
2020-07-18 17:27:41 +02:00
committed by GitHub
parent 3b6a8be07b
commit 23d8742f0d
174 changed files with 2158 additions and 2164 deletions

View File

@@ -1,8 +1,10 @@
package slack
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"net/http"
"net/url"
"strconv"
@@ -206,6 +208,15 @@ func (api *Client) SendMessageContext(ctx context.Context, channelID string, opt
return "", "", "", err
}
if api.Debug() {
reqBody, err := ioutil.ReadAll(req.Body)
if err != nil {
return "", "", "", err
}
req.Body = ioutil.NopCloser(bytes.NewBuffer(reqBody))
api.Debugf("Sending request: %s", string(reqBody))
}
if err = doPost(ctx, api.httpclient, req, parser(&response), api); err != nil {
return "", "", "", err
}