package main import ( "log" "net/http" "fmt" ) func reply(rw http.ResponseWriter, req *http.Request) { err := req.ParseForm() if err != nil { rw.Write([]byte(fmt.Sprintf ("Error %s processing request", err))) return; } rw.Write([]byte(`
`)) if len(req.Form) > 0 { rw.Write([]byte(fmt.Sprintf ("
%s
", req.Form))) } rw.Write([]byte(` `)) } func main() { http.HandleFunc("/", reply) log.Fatal(http.ListenAndServe(":8082", nil)) }