mirror of
https://github.com/fosrl/badger.git
synced 2026-02-07 21:46:43 +00:00
add more loggin
This commit is contained in:
9
main.go
9
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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user