From a1ff907768adcb93160f77d651fd41ee314f9f4a Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Wed, 16 Jul 2014 02:49:22 +0200 Subject: [PATCH] Fixed Content-Type for json render. Thank you @mdigger --- render/render.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render/render.go b/render/render.go index cc67affc..809ef899 100644 --- a/render/render.go +++ b/render/render.go @@ -42,7 +42,7 @@ func writeHeader(w http.ResponseWriter, code int, contentType string) { } 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) return encoder.Encode(data[0]) }