Lines Matching refs:http
24 "net/http"
83 http.HandleFunc("/report_gold_data", reporter)
84 http.HandleFunc("/dump_json", dumpJSON)
88 log.Fatal(http.ListenAndServe(":"+*port, nil))
94 func reporter(w http.ResponseWriter, r *http.Request) {
96 http.Error(w, "Only POST accepted", 400)
103 http.Error(w, "Malformed body", 400)
110 http.Error(w, "Could not unmarshal JSON", 400)
117 http.Error(w, "Could not write image to disk", 500)
152 func dumpJSON(w http.ResponseWriter, r *http.Request) {
154 http.Error(w, "Only POST accepted", 400)
163 http.Error(w, "Could not open json file on disk", 500)
184 http.Error(w, "Could not write json to disk", 500)