'Helper for non-HTML responses, or HTML responses with custom
response headers or cookies.
While handlers can just return the HTML markup of a page they want to
send as a string if non-HTML data is returned they need to create a
complete response object, or the returned data will not be correctly
interpreted by the clients.
:param basestring data: response body
:param headers: HTTP headers to set on the response
:type headers: ``[(name, value)]``
:param collections.Mapping cookies: cookies to set on the client'

def make_response(self, data, headers=None, cookies=None):

    response = Response(data, headers=headers)
    if cookies:
        for (k, v) in cookies.iteritems():
            response.set_cookie(k, v)
    return response
