'Convenience call to return output and set status information
Conforms to the WSGI interface for calling purposes only.
Example usage:
.. code-block:: python
def wsgi_app(environ, start_response):
response = WSGIResponse()
response.write("Hello world")
response.headers[\'Content-Type\'] = \'latin1\'
return response(environ, start_response)'

def __call__(self, environ, start_response):

    status_text = STATUS_CODE_TEXT[self.status_code]
    status = ('%s    %s' % (self.status_code, status_text))
    response_headers = self.headers.headeritems()
    for c in self.cookies.values():
        response_headers.append(('Set-Cookie', c.output(header='')))
    start_response(status, response_headers)
    is_file = isinstance(self.content, file)
    if (('wsgi.file_wrapper' in environ) and is_file):
        return environ['wsgi.file_wrapper'](self.content)
    elif is_file:
        return iter((lambda : self.content.read()), '')
    return self.get_content()
