How to send xml / application format in a bottle?

If someone comes to my url, suppose / get it, he should return the xml / application format in response to the frame of flash memory. How can i do this? I am using elementree as an xml generator.

+4
source share
1 answer

Take a look at the official page for an example cookie and follow these steps:

@route('/xml') def xml(): response.headers['Content-Type'] = 'xml/application' ....(create the xml here)...... return xml_content_whatever 
+5
source

All Articles