MCPcopy Index your code
hub / github.com/rawpython/remi / remove_cookie

Method remove_cookie

examples/session_app.py:63–71  ·  view source on GitHub ↗
(self, key, path='/', domain='')

Source from the content-addressed store, hash-verified

61 return (value,)
62
63 def remove_cookie(self, key, path='/', domain=''):
64 if not key in self.cookies.keys():
65 return
66 self.app_instance.execute_javascript( """
67 var sKey = "%(sKey)s";
68 var sPath = "%(sPath)s";
69 var sDomain = "%(sDomain)s";
70 document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "");
71 """%{'sKey': key, 'sPath': path, 'sDomain': domain} )
72
73 def set_cookie(self, key, value, expiration='Infinity', path='/', domain='', secure=False):
74 """

Callers

nothing calls this directly

Calls 1

execute_javascriptMethod · 0.80

Tested by

no test coverage detected