From 0b49c84bb07d2472c549b2685bda0013aff3584c Mon Sep 17 00:00:00 2001 From: Milo Schwartz Date: Sun, 24 Nov 2024 13:50:22 -0500 Subject: [PATCH] add more loggin --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index e6a7b02..f93c333 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "fmt" + "io" "net/http" ) @@ -137,6 +138,14 @@ func (p *Badger) ServeHTTP(rw http.ResponseWriter, req *http.Request) { return } + bodyContent, err := io.ReadAll(resp.Body) + if err != nil { + http.Error(rw, "Internal Server Error", http.StatusInternalServerError) + return + } + + fmt.Println("response body:", string(bodyContent)) + fmt.Println("handling response") if result.RedirectURL != nil && *result.RedirectURL != "" {