commit 426f0aa4d51c82555e959623528af7702d0c5b6b
parent 475153983b5b4d162904e4e11eb692f6d73038fc
Author: Vetle Haflan <vetle@haflan.dev>
Date: Wed, 13 Apr 2022 16:12:32 +0200
Print request headers in glogserver.go
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/glogserver.go b/glogserver.go
@@ -18,7 +18,7 @@ func main() {
log.Print("error:", err)
}
defer r.Body.Close()
- log.Printf("%v %v\n", r.Method, r.RequestURI)
+ log.Printf("%v %v | Headers: %v\n", r.Method, r.RequestURI, r.Header)
if len(b) > 0 {
log.Println("-<body>-----------------------------")
log.Println(string(b))