aboutsummaryrefslogtreecommitdiff
path: root/cmd/httpdebug/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/httpdebug/main.go')
-rw-r--r--cmd/httpdebug/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/httpdebug/main.go b/cmd/httpdebug/main.go
index 8d61c03..1f7a042 100644
--- a/cmd/httpdebug/main.go
+++ b/cmd/httpdebug/main.go
@@ -2,9 +2,12 @@ package main
import (
"flag"
+ "fmt"
+ "io"
"log"
"log/slog"
"net/http"
+ "os"
"within.website/x/internal"
)
@@ -19,7 +22,9 @@ func main() {
slog.Info("listening", "url", "http://localhost"+*bind)
log.Fatal(http.ListenAndServe(*bind, http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
- r.Write(w)
+ fmt.Println("---")
+ r.Write(io.MultiWriter(w, os.Stdout))
+ fmt.Println("---")
},
)))
}