From a62592c6be9c644933744fd8d414bb5f02ab0c3b Mon Sep 17 00:00:00 2001 From: sirrow Date: Wed, 22 Jan 2020 17:10:05 +0900 Subject: [PATCH] initial --- main.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 main.go diff --git a/main.go b/main.go new file mode 100644 index 0000000..489aa0d --- /dev/null +++ b/main.go @@ -0,0 +1,18 @@ +package main + +import ( + fmt "fmt" + "log" + "net/http" +) + + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + for k, v := range r.Header { + fmt.Fprintf(w, "%q : %q\n", k, v) + } + }) + + log.Fatal(http.ListenAndServe(":8080", nil)) +}