diff --git a/src/httpcat.go b/src/httpcat.go index 2c14295..df989da 100644 --- a/src/httpcat.go +++ b/src/httpcat.go @@ -66,8 +66,17 @@ if(err != nil) { fmt.Println(err); } else { - dump, _ := httputil.DumpResponse(response, true) - fmt.Println(string(dump[:])) + + // print complete response + if complete { + dump, _ := httputil.DumpResponse(response, true) + fmt.Println(string(dump[:])) + + // print only the response body + } else { + body, _ := ioutil.ReadAll(response.Body) + fmt.Println(string(body[:])); + } } }