From c197e138efc9b4a5243a281d894ad5c472ee738a Mon Sep 17 00:00:00 2001 From: "T. von Dein" Date: Fri, 3 Jul 2026 13:30:37 +0200 Subject: [PATCH] fix repl output: didn't print json smaller than term height, add debug-http to api repl as well (#68) --- pkg/es/api.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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