Add support for custom HTML and XML content-type

This commit is contained in:
Manu Mtz-Almeida
2015-06-13 04:43:23 +02:00
parent a7c957af7d
commit 352868ef90
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ type XML struct {
var xmlContentType = []string{"application/xml; charset=utf-8"}
func (r XML) Render(w http.ResponseWriter) error {
w.Header()["Content-Type"] = xmlContentType
writeContentType(w, xmlContentType)
return xml.NewEncoder(w).Encode(r.Data)
}