MCPcopy Create free account
hub / github.com/EasyIME/PIME / get_cookie

Method get_cookie

python/python3/tornado/web.py:585–596  ·  view source on GitHub ↗

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.

(self, name: str, default: Optional[str] = None)

Source from the content-addressed store, hash-verified

583 return self.request.cookies
584
585 def get_cookie(self, name: str, default: Optional[str] = None) -> Optional[str]:
586 """Returns the value of the request cookie with the given name.
587
588 If the named cookie is not present, returns ``default``.
589
590 This method only returns cookies that were present in the request.
591 It does not see the outgoing cookies set by `set_cookie` in this
592 handler.
593 """
594 if self.request.cookies is not None and name in self.request.cookies:
595 return self.request.cookies[name].value
596 return default
597
598 def set_cookie(
599 self,

Callers 8

get_secure_cookieMethod · 0.95
_get_raw_xsrf_tokenMethod · 0.95
get_current_userMethod · 0.45
get_current_userMethod · 0.45
get_current_userMethod · 0.45
get_current_userMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected