Skip to content

Commit 16ffd08

Browse files
committed
Update dev/load.go
1 parent 87482d4 commit 16ffd08

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dev/load.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const (
5151

5252
// other options
5353
_printSuccessDots = true
54+
_printBody = false
5455
_printHTTPErrors = true
5556
_printGoErrors = true
5657
)
@@ -302,6 +303,13 @@ func makeRequest(url string, jsonBytes []byte) {
302303
if _printSuccessDots {
303304
fmt.Print(".")
304305
}
306+
if _printBody {
307+
bodyStr := string(body)
308+
if bodyStr == "" {
309+
bodyStr = "(no body)"
310+
}
311+
fmt.Print(bodyStr)
312+
}
305313
}
306314

307315
func mustReadJSONBytes(jsonPath string) []byte {

0 commit comments

Comments
 (0)