Skip to content

Commit

Permalink
Add debug log for http requests when using HttpClient.Send
Browse files Browse the repository at this point in the history
  • Loading branch information
barbelity authored Feb 25, 2019
1 parent 5636db9 commit 66fe322
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion httpclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ func (jc *HttpClient) SendPut(url string, content []byte, httpClientsDetails htt
return
}

func (jc *HttpClient) Send(method string, url string, content []byte, followRedirect bool, closeBody bool, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, respBody []byte, redirectUrl string, err error) {
func (jc *HttpClient) Send(method, url string, content []byte, followRedirect, closeBody bool, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, respBody []byte, redirectUrl string, err error) {
var req *http.Request
log.Debug(fmt.Sprintf("Sending HTTP %s request to: %s", method, url))
if content != nil {
req, err = http.NewRequest(method, url, bytes.NewBuffer(content))
} else {
Expand Down

0 comments on commit 66fe322

Please sign in to comment.