@@ -14,8 +14,8 @@ import (
14
14
"go.uber.org/zap"
15
15
)
16
16
17
- // DoRequestV2 constructs and executes an HTTP request, choosing the execution path based on the idempotency of the HTTP method.
18
- func (c * Client ) DoRequestV2 (method , endpoint string , body , out interface {}, log logger.Logger ) (* http.Response , error ) {
17
+ // DoRequest constructs and executes an HTTP request, choosing the execution path based on the idempotency of the HTTP method.
18
+ func (c * Client ) DoRequest (method , endpoint string , body , out interface {}, log logger.Logger ) (* http.Response , error ) {
19
19
if IsIdempotentHTTPMethod (method ) {
20
20
return c .executeRequestWithRetries (method , endpoint , body , out , log )
21
21
} else if IsNonIdempotentHTTPMethod (method ) {
@@ -323,6 +323,7 @@ func (c *Client) handleSuccessResponse(resp *http.Response, out interface{}, log
323
323
// Note:
324
324
// The function assumes that retryable HTTP methods have been properly defined in the retryableHTTPMethods map.
325
325
// It is the caller's responsibility to close the response body when the request is successful to avoid resource leaks.
326
+ /*
326
327
func (c *Client) DoRequest(method, endpoint string, body, out interface{}, log logger.Logger) (*http.Response, error) {
327
328
// Auth Token validation check
328
329
valid, err := c.ValidAuthTokenCheck(log)
@@ -557,7 +558,7 @@ func (c *Client) DoRequest(method, endpoint string, body, out interface{}, log l
557
558
// TODO refactor to remove repition and to streamline error handling.
558
559
return nil, fmt.Errorf("an unexpected error occurred")
559
560
}
560
-
561
+ */
561
562
// DoMultipartRequest creates and executes a multipart HTTP request. It is used for sending files
562
563
// and form fields in a single request. This method handles the construction of the multipart
563
564
// message body, setting the appropriate headers, and sending the request to the given endpoint.
0 commit comments