문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top