Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (21 sloc) 471 Bytes
package main
import (
func handler(w http.ResponseWriter, r *http.Request) {
var resp []string
resp = append(resp, "Oh, Hello!")
for name, headers := range r.Header {
for _, h := range headers {
resp = append(resp, fmt.Sprintf("%v: %v", name, h))
// fmt.Fprintf(w, strings.Join(resp, "\n"))
w.Write([]byte(strings.Join(resp, "\n")))
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8123", nil)
You can’t perform that action at this time.