Skip to content

Commit 3993139

Browse files
committed
dont print request body if empty
1 parent cba1c6b commit 3993139

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bat.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,10 @@ func main() {
291291
fmt.Println("")
292292
}
293293
if printOption&printReqBody == printReqBody {
294-
fmt.Println(string(dumpBody))
295-
fmt.Println("")
294+
if string(dumpBody) != "\r\n" {
295+
fmt.Println(string(dumpBody))
296+
fmt.Println("")
297+
}
296298
}
297299
if printOption&printRespHeader == printRespHeader {
298300
fmt.Println(Color(res.Proto, Magenta), Color(res.Status, Green))

0 commit comments

Comments
 (0)