Adds supports for custom JSON Content-type

This commit is contained in:
Manu Mtz-Almeida
2015-06-13 04:29:10 +02:00
parent 22f118f3b6
commit a7c957af7d
4 changed files with 23 additions and 6 deletions
+7
View File
@@ -21,3 +21,10 @@ var (
_ HTMLRender = HTMLDebug{}
_ HTMLRender = HTMLProduction{}
)
func writeContentType(w http.ResponseWriter, value []string) {
header := w.Header()
if val := header["Content-Type"]; len(val) == 0 {
header["Content-Type"] = value
}
}