mirror of
https://github.com/fosrl/badger.git
synced 2026-02-08 05:56:46 +00:00
add more loggin
This commit is contained in:
9
main.go
9
main.go
@@ -5,6 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -137,6 +138,14 @@ func (p *Badger) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||||||
return
|
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")
|
fmt.Println("handling response")
|
||||||
|
|
||||||
if result.RedirectURL != nil && *result.RedirectURL != "" {
|
if result.RedirectURL != nil && *result.RedirectURL != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user