[cli] Log query params in debug mode

This commit is contained in:
Neeraj Gupta 2024-03-12 14:32:41 +05:30 committed by Neeraj Gupta
parent f21a627a71
commit ddd89aa1d1

View file

@ -30,6 +30,13 @@ func logRequest(req *resty.Request) {
}
}
}
// log query params if present
if len(req.QueryParam) > 0 {
fmt.Println(color.GreenString("Query Params:"))
for k, v := range req.QueryParam {
fmt.Printf("%s: %s\n", color.CyanString(k), color.YellowString(strings.Join(v, ",")))
}
}
}
func logResponse(resp *resty.Response) {