finding a bug

This commit is contained in:
Daniel Ledda
2020-11-01 00:31:58 +01:00
parent 5b8e05b326
commit c9f2d24f43

View File

@@ -40,6 +40,9 @@ func viewHandler(w http.ResponseWriter, r *http.Request) {
if r.PostForm != nil { if r.PostForm != nil {
fmt.Println(r.FormValue("temp")) fmt.Println(r.FormValue("temp"))
} }
if r.Form != nil {
fmt.Println(r.FormValue("temp"))
}
fmt.Println("Request received") fmt.Println("Request received")
_, _ = fmt.Fprint(w, "<h1>Climate Stuff</h1><div>The data will show up here at some stage...</div>") _, _ = fmt.Fprint(w, "<h1>Climate Stuff</h1><div>The data will show up here at some stage...</div>")
} }