updated content-type to application/json (fixes #10500) Signed-off-by: prathik8794 <me20b030@iittp.ac.in>
This commit is contained in:
+1
-1
@@ -203,7 +203,7 @@ func (s *service) getListener(guiCfg config.GUIConfiguration) (net.Listener, err
|
||||
}
|
||||
|
||||
func sendJSON(w http.ResponseWriter, jsonObject interface{}) {
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
// Marshalling might fail, in which case we should return a 500 with the
|
||||
// actual error.
|
||||
bs, err := json.MarshalIndent(jsonObject, "", " ")
|
||||
|
||||
Reference in New Issue
Block a user