From 6c771cce3b622f76ea7fd24a282bc7e9a30b05de Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 1 Jan 2018 13:59:57 -0600 Subject: [PATCH] add utf8 to response's header --- app/rest/server.go | 2 +- remark.rest | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/rest/server.go b/app/rest/server.go index 03fa698a..a3441f4a 100644 --- a/app/rest/server.go +++ b/app/rest/server.go @@ -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) } diff --git a/remark.rest b/remark.rest index ba1cb516..2891310e 100644 --- a/remark.rest +++ b/remark.rest @@ -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 + +###