diff --git a/vngcloud/client/http.go b/vngcloud/client/http.go index c1bde96..f6433ba 100644 --- a/vngcloud/client/http.go +++ b/vngcloud/client/http.go @@ -2,6 +2,7 @@ package client import ( lctx "context" + "fmt" lhttp "net/http" lstr "strings" lsync "sync" @@ -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 { @@ -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) }