# get_argument is an exception from the general rule of using
# type str for non-body data mainly for historical reasons.
self.check_type('argument', self.get_argument('foo'), unicode)
+ self.check_type('cookie_key', self.cookies.keys()[0], str)
+ self.check_type('cookie_value', self.cookies.values()[0].value, str)
self.check_type('xsrf_token', self.xsrf_token, bytes_type)
self.check_type('xsrf_form_html', self.xsrf_form_html(), str)
"""
return _unicode(value)
+ @property
+ def cookies(self):
+ return self.request.cookies
+
def get_cookie(self, name, default=None):
"""Gets the value of the cookie with the given name, else default."""
if name in self.request.cookies: