MCPcopy
hub / github.com/psf/requests / copy

Method copy

src/requests/cookies.py:467–472  ·  view source on GitHub ↗

Return a copy of this RequestsCookieJar.

(self)

Source from the content-addressed store, hash-verified

465 self._cookies_lock = threading.RLock()
466
467 def copy(self) -> RequestsCookieJar:
468 """Return a copy of this RequestsCookieJar."""
469 new_cj = RequestsCookieJar()
470 new_cj.set_policy(self.get_policy())
471 new_cj.update(self)
472 return new_cj
473
474 def get_policy(self) -> CookiePolicy:
475 """Return the CookiePolicy instance used."""

Callers 4

updateMethod · 0.45
__getstate__Method · 0.45
_copy_cookie_jarFunction · 0.45

Calls 3

get_policyMethod · 0.95
updateMethod · 0.95
RequestsCookieJarClass · 0.85

Tested by 1