mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add API endpoint for OPML export
This commit is contained in:
parent
9652dfa1fe
commit
4aec2453f4
3 changed files with 21 additions and 0 deletions
|
@ -21,3 +21,9 @@ func (x *XMLResponse) Download(filename, data string) {
|
|||
x.writer.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s", filename))
|
||||
x.writer.Write([]byte(data))
|
||||
}
|
||||
|
||||
// Serve forces the XML to be sent to browser.
|
||||
func (x *XMLResponse) Serve(data string) {
|
||||
x.writer.Header().Set("Content-Type", "text/xml")
|
||||
x.writer.Write([]byte(data))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue