Use the set_content_type() method on the HTTPResponse object. Something like request.response.set_content_type("application/xml") Is that supposed to be "text/xml" instead of "application/xml"?