Files
httpheader/main.go
2020-01-22 17:10:05 +09:00

19 lines
265 B
Go

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))
}