diff --git a/pkg/es/api.go b/pkg/es/api.go index 8d226e1..1ed3c24 100644 --- a/pkg/es/api.go +++ b/pkg/es/api.go @@ -182,7 +182,11 @@ func pageJsonOutput(conf *cfg.Config, raw []byte) { } else { printer.Pager("json output", output) } + + return } + + fmt.Println(output) } func encodeAuth(username, password string) string { @@ -199,6 +203,12 @@ func CallAPI(conf *cfg.Config, verb, path, data string) ([]byte, error) { client := &http.Client{Transport: tr} + if conf.DebugHTTP { + client = &http.Client{ + Transport: &cfg.DebugTransport{ + Transport: tr}} + } + req, err := http.NewRequest(verb, conf.DefaultCluster.Uri+path, bytes.NewBuffer([]byte(data))) if err != nil { return nil, err