'@param code: The HTTP response code to set in the response.
@type code: L{int}
@param result: The (structured) value to put into the response
body.  This must be JSON encodeable.
@param headers: Mapping between keys and values, to be sent as
headers in the HTTP response.'

def __init__(self, code, result, headers=pmap()):

    self.code = code
    self.result = result
    self.headers = headers
