Skip to content

Commit

Permalink
getJson DEBUG log resp.Body
Browse files Browse the repository at this point in the history
  • Loading branch information
shoce committed Jun 7, 2024
1 parent f4464f1 commit 99a73c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tgzebot.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ func getJson(url string, target interface{}, respjson *string) (err error) {
return fmt.Errorf("json.Decoder.Decode: %w", err)
}

log("getJson %s response ContentLength:%d Body:"+NL+"%s", url, resp.ContentLength, respBody)
if DEBUG {
log("getJson %s response ContentLength:%d Body:"+NL+"%s", url, resp.ContentLength, respBody)
}
if respjson != nil {
*respjson = string(respBody)
log("getJson %s respjson:"+NL+"%s", url, *respjson)
Expand Down

0 comments on commit 99a73c0

Please sign in to comment.