[cli] Log query params in debug mode
This commit is contained in:
parent
f21a627a71
commit
ddd89aa1d1
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue