Add support for custom HTML and XML content-type
This commit is contained in:
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user