MCPcopy Create free account
hub / github.com/apify/impit / set

Method set

impit-python/python/impit/cookies.py:49–71  ·  view source on GitHub ↗

Set a cookie value by name. May optionally include domain and path.

(self, name: str, value: str, domain: str = '', path: str = '/')

Source from the content-addressed store, hash-verified

47 self.jar = cookies
48
49 def set(self, name: str, value: str, domain: str = '', path: str = '/') -> None:
50 """Set a cookie value by name. May optionally include domain and path."""
51 kwargs = {
52 'version': 0,
53 'name': name,
54 'value': value,
55 'port': None,
56 'port_specified': False,
57 'domain': domain,
58 'domain_specified': bool(domain),
59 'domain_initial_dot': domain.startswith('.'),
60 'path': path,
61 'path_specified': bool(path),
62 'secure': False,
63 'expires': None,
64 'discard': True,
65 'comment': None,
66 'comment_url': None,
67 'rest': {'HttpOnly': None},
68 'rfc2109': False,
69 }
70 cookie = Cookie(**kwargs) # type: ignore[arg-type]
71 self.jar.set_cookie(cookie)
72
73 def get( # type: ignore[override]
74 self,

Callers 9

__init__Method · 0.95
__setitem__Method · 0.95
concatUint8ArraysFunction · 0.80
runServerFunction · 0.80
getHttpBinUrlFunction · 0.80
basics.test.tsFile · 0.80
get_inner_responseMethod · 0.80
stop_serverFunction · 0.80

Calls

no outgoing calls

Tested by 1

getHttpBinUrlFunction · 0.64