Skip to content

Commit

Permalink
Merge pull request #12 from sheremetat/master
Browse files Browse the repository at this point in the history
Added charset UTF-8 to JSON renderer function
  • Loading branch information
VojtechVitek committed May 31, 2018
2 parents 8c8c7a4 + a0a517c commit 3215478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func JSON(w http.ResponseWriter, r *http.Request, v interface{}) {
return
}

w.Header().Set("Content-Type", "application/json")
w.Header().Set("Content-Type", "application/json; charset=utf-8")
if status, ok := r.Context().Value(StatusCtxKey).(int); ok {
w.WriteHeader(status)
}
Expand Down

0 comments on commit 3215478

Please sign in to comment.