Skip to content
Snippets Groups Projects
Commit 80068c19 authored by Marius Nersveen's avatar Marius Nersveen
Browse files

Better way of sending the data to the browser window

parent bda6f9f6
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,7 @@ func HandleGetRequestForCurrentPercentage(w http.ResponseWriter, r *http.Request
}
//fmt.Println(string(jsonData)) // Print the JSON data to the console
fmt.Fprintf(w, "%v", string(jsonData)) // Print the JSON data to the browser
//fmt.Fprintf(w, "%v", string(jsonData)) // Print the JSON data to the browser
w.Header().Set("content-type", "application/json")
w.Write(jsonData)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment