Skip to content

Commit

Permalink
Merge pull request #108 from tsawler/development
Browse files Browse the repository at this point in the history
Add XML header to output.
  • Loading branch information
tsawler authored Jun 14, 2023
2 parents 5cc31e4 + b25a97b commit f7c6454
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ func (t *Tools) WriteXML(w http.ResponseWriter, status int, data interface{}, he
// treated as the same, so we'll just pick one.
w.Header().Set("Content-Type", "application/xml")
w.WriteHeader(status)
_, _ = w.Write(out)
// Add the XML header.
xmlOut := []byte(xml.Header + string(out))
_, _ = w.Write(xmlOut)

return nil
}
Expand Down

0 comments on commit f7c6454

Please sign in to comment.