If some one come to my url suppose /get it should give back a xml/application format in response in bottle framework. How can i do this? i am using elementree as xml generator.
+1
A:
Look on the official page for the cookie example and do it like this:
@route('/xml')
def xml():
response.headers['Content-Type'] = 'xml/application'
....(create the xml here)......
return xml_content_whatever
Andre Bossard
2010-08-16 10:47:01
Or `response.content_type = 'xml/application'`
Marcel
2010-08-17 13:47:01