MCPcopy
hub / github.com/encode/httpx / extract_cookies

Method extract_cookies

httpx/_models.py:1101–1108  ·  view source on GitHub ↗

Loads any cookies based on the response `Set-Cookie` headers.

(self, response: Response)

Source from the content-addressed store, hash-verified

1099 self.jar = cookies
1100
1101 def extract_cookies(self, response: Response) -> None:
1102 """
1103 Loads any cookies based on the response `Set-Cookie` headers.
1104 """
1105 urllib_response = self._CookieCompatResponse(response)
1106 urllib_request = self._CookieCompatRequest(response.request)
1107
1108 self.jar.extract_cookies(urllib_response, urllib_request) # type: ignore
1109
1110 def set_cookie_header(self, request: Request) -> None:
1111 """

Callers 4

test_multiple_set_cookieFunction · 0.95
cookiesMethod · 0.80
_send_single_requestMethod · 0.80
_send_single_requestMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_multiple_set_cookieFunction · 0.76