Skip to content

Commit

Permalink
🌱 add: debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
anngdinh committed Dec 27, 2024
1 parent b2e9729 commit d7b1cb3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vngcloud/client/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
lctx "context"
"fmt"
lhttp "net/http"
lstr "strings"
lsync "sync"
Expand Down Expand Up @@ -100,6 +101,7 @@ func (s *httpClient) DoRequest(purl string, preq IRequest) (*lreq.Response, lser
req := s.client.R().SetContext(s.context).SetHeaders(s.getDefaultHeaders()).SetHeaders(preq.GetMoreHeaders())
if opt := preq.GetRequestBody(); opt != nil {
req.SetBodyJsonMarshal(opt)
fmt.Println("RRRRRRRRRRRR: ", string(req.Body))
}

if opt := preq.GetJsonResponse(); opt != nil {
Expand All @@ -125,6 +127,10 @@ func (s *httpClient) DoRequest(purl string, preq IRequest) (*lreq.Response, lser
resp, err = req.Patch(purl)
}

fmt.Println(">>>>>>>>>>: ", resp)
fmt.Println("err: ", err)
fmt.Println("--------------------------------------------------------------------")

if err != nil && resp == nil {
return resp, lserr.ErrorHandler(err)
}
Expand Down

0 comments on commit d7b1cb3

Please sign in to comment.