Fixed Content-Type for json render. Thank you @mdigger

This commit is contained in:
Manu Mtz-Almeida 2014-07-16 02:49:22 +02:00
parent 5ea7a92267
commit a1ff907768
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ func writeHeader(w http.ResponseWriter, code int, contentType string) {
} }
func (_ jsonRender) Render(w http.ResponseWriter, code int, data ...interface{}) error { func (_ jsonRender) Render(w http.ResponseWriter, code int, data ...interface{}) error {
writeHeader(w, code, "application/xml") writeHeader(w, code, "application/json")
encoder := json.NewEncoder(w) encoder := json.NewEncoder(w)
return encoder.Encode(data[0]) return encoder.Encode(data[0])
} }