add utf8 to response's header

This commit is contained in:
Umputun
2018-01-01 13:59:57 -06:00
parent 62ae58f530
commit 6c771cce3b
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -335,7 +335,7 @@ func renderJSONWithHTML(w http.ResponseWriter, r *http.Request, v interface{}) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Content-Type", "application/json; charset=utf-8")
if status, ok := r.Context().Value(render.StatusCtxKey).(int); ok {
w.WriteHeader(status)
}
+2
View File
@@ -45,3 +45,5 @@ GET https://demo.remark42.com/api/v1/count?site=remark&url=https://radio-t.com/p
### list commented posts
GET https://demo.remark42.com/api/v1/list?site=remark
###