send content-type application/json
This commit is contained in:
@@ -208,6 +208,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func SendJSON(data interface{}, w http.ResponseWriter) error {
|
func SendJSON(data interface{}, w http.ResponseWriter) error {
|
||||||
|
w.Header().Set("content-type", "application/json")
|
||||||
playerJson, err := json.Marshal(data)
|
playerJson, err := json.Marshal(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Reference in New Issue
Block a user