def __init__(self, req, result=None, code=None, headers=None, **kwargs):
<EOL>self.req = req<EOL>self.result = result<EOL>self._code = code<EOL>self._headers = {}<EOL>if headers:<EOL><INDENT>self.update(headers)<EOL><DEDENT>self._defcode = None<EOL>self.content_type = None<EOL>self.type_name = None<EOL>self.serializer = None<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>self._bind(**kwargs)<EOL><DEDENT>
Initialize a ResponseObject.

:param req: The request associated with the response.
:param result: The optional result.
:param code: The HTTP response code.  If not specified, the
             default set by the @action() decorator will be
             used.  If no default was specified by @action(),
             then the default will be 200.
:param headers: A dictionary of headers for the response.
                Note that keys will be handled in a
                case-insensitive manner.