'Returns the value of the request cookie with the given name.
If the named cookie is not present, returns ``default``.
This method only returns cookies that were present in the request.
It does not see the outgoing cookies set by `set_cookie` in this
handler.'

def get_cookie(self, name, default=None):

    if ((self.request.cookies is not None) and (name in self.request.cookies)):
        return self.request.cookies[name].value
    return default
