I am using Flask and I return an XML file from a get request. How do I set the content type to xml ?

e.g.

@app.route('/ajax_ddl')
def ajax_ddl():
    xml="foo"
    header("Content-type: text/xml")
    return xml

7 Answers
7

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *