Skip to content

Commit 86ee29f

Browse files
committed
chore: Update httpclient/multipartrequest.go to use httpClient instead of c.do
1 parent ce0d676 commit 86ee29f

File tree

3 files changed

+501
-210
lines changed

3 files changed

+501
-210
lines changed

httpclient/multipartrequest.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/deploymenttheory/go-api-http-client/authenticationhandler"
99
"github.com/deploymenttheory/go-api-http-client/headers"
1010
"github.com/deploymenttheory/go-api-http-client/response"
11+
"go.uber.org/zap"
1112
)
1213

1314
// DoMultipartRequest creates and executes a multipart HTTP request. It is used for sending files
@@ -78,8 +79,9 @@ func (c *Client) DoMultipartRequest(method, endpoint string, fields map[string]s
7879
headerHandler.LogHeaders(c.clientConfig.ClientOptions.Logging.HideSensitiveData)
7980

8081
// Execute the request
81-
resp, err := c.do(req, log, method, endpoint)
82+
resp, err := c.httpClient.Do(req)
8283
if err != nil {
84+
log.Error("Failed to send request", zap.String("method", method), zap.String("endpoint", endpoint), zap.Error(err))
8385
return nil, err
8486
}
8587

0 commit comments

Comments
 (0)