Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果有人来到我的 url 假设 /get 它应该返回一个 xml/应用程序格式作为响应瓶框架。我怎样才能做到这一点?我使用 elementree 作为 xml 生成器。
在官方页面上查看 cookie 示例并执行以下操作:
@route('/xml') def xml(): response.headers['Content-Type'] = 'xml/application' ....(create the xml here)...... return xml_content_whatever