Lines Matching refs:http
24 "net/http"
82 http.HandleFunc("/report_gold_data", reporter)
83 http.HandleFunc("/dump_json", dumpJSON)
87 log.Fatal(http.ListenAndServe(":"+*port, nil))
93 func reporter(w http.ResponseWriter, r *http.Request) {
95 http.Error(w, "Only POST accepted", 400)
102 http.Error(w, "Malformed body", 400)
109 http.Error(w, "Could not unmarshal JSON", 400)
116 http.Error(w, "Could not write image to disk", 500)
151 func dumpJSON(w http.ResponseWriter, r *http.Request) {
153 http.Error(w, "Only POST accepted", 400)
162 http.Error(w, "Could not open json file on disk", 500)
181 http.Error(w, "Could not write json to disk", 500)