mirror of
https://github.com/fosrl/badger.git
synced 2025-05-13 05:40:39 +01:00
add more loggin
This commit is contained in:
parent
9702e9c069
commit
0b49c84bb0
1 changed files with 9 additions and 0 deletions
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 != "" {
|
||||
|
|
Loading…
Reference in a new issue