set content header in marshalJSON
This commit is contained in:
parent
1cee49002d
commit
2ff421188e
1 changed files with 1 additions and 0 deletions
|
@ -13,6 +13,7 @@ func MarshalJSON(w http.ResponseWriter, i interface{}) {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
w.Header().Set("content-type", "application/json")
|
||||||
_, err = w.Write(b)
|
_, err = w.Write(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Error("error writing response")
|
logrus.Error("error writing response")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue