Skip to content

Commit d83706d

Browse files
committed
Refactor code and remove dependency on SetRequestHeaders function
1 parent 9b1b93e commit d83706d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

httpclient/httpclient_headers_old.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
package httpclient
22

3-
import (
4-
"net/http"
5-
6-
"github.com/deploymenttheory/go-api-http-client/logger"
7-
"go.uber.org/zap"
8-
)
9-
3+
/*
104
// SetRequestHeaders sets the necessary HTTP headers for a given request. It configures the Authorization,
115
// Content-Type, and Accept headers based on the client's current token, the content type specified by the
126
// caller, and the preferred response formats defined by the APIHandler's GetAcceptHeader method.
@@ -50,3 +44,4 @@ func (c *Client) SetRequestHeaders(req *http.Request, contentType, acceptHeader
5044
)
5145
}
5246
}
47+
*/

httpclient/httpclient_request.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,5 +457,4 @@ func (c *Client) DoMultipartRequest(method, endpoint string, fields map[string]s
457457
// Handle successful responses
458458
return resp, c.handleSuccessResponse(resp, out, log, method, endpoint)
459459
}
460-
// TODO refactor to remove dependancy on func (c *Client) SetRequestHeaders
461460
}

0 commit comments

Comments
 (0)