XMLRPC response.
This object is responsible for converting all output to valid XML-RPC.
authUser
(type: member_descriptor
)
<member 'authUser' of 'HTTPResponse' objects>
addHeader(name, value)
See IHTTPResponse
appendToCookie(name, value)
See IHTTPResponse
consumeBody()
See IHTTPResponse
consumeBodyIter()
See IHTTPResponse
expireCookie(name, **kw)
See IHTTPResponse
getCookie(name, default=None)
See IHTTPResponse
getHeader(name, default=None, literal=False)
See IHTTPResponse
getHeaders()
See IHTTPResponse
getStatus()
See IHTTPResponse
getStatusString()
See IHTTPResponse
handleException(exc_info)
Handle Errors during publsihing and wrap it in XML-RPC XML
>>> import sys >>> resp = XMLRPCResponse() >>> try: ... raise AttributeError('xyz') ... except: ... exc_info = sys.exc_info() ... resp.handleException(exc_info)
>>> resp.getStatusString() '200 OK' >>> resp.getHeader('content-type') 'text/xml;charset=utf-8' >>> body = ''.join(resp.consumeBody()) >>> 'Unexpected Zope exception: AttributeError: xyz' in body True
internalError()
See IPublisherResponse
redirect(location, status=None)
Causes a redirection without raising an error
reset()
See IResponse
retry()
Returns a response object to be used in a retry attempt
setCookie(name, value, **kw)
See IHTTPResponse
setHeader(name, value, literal=False)
See IHTTPResponse
setResult(result)
Sets the result of the response
Sets the return body equal to the (string) argument "body". Also updates the "content-length" return header.
If the body is a 2-element tuple, then it will be treated as (title,body)
If is_error is true then the HTML will be formatted as a Zope error message instead of a generic HTML page.
setStatus(status, reason=None)
See IHTTPResponse
write(*_)
There are no known subclasses.