MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / cookies

Method cookies

mitmproxy/http.py:1156–1168  ·  view source on GitHub ↗

The response cookies. A possibly empty `MultiDictView`, where the keys are cookie name strings, and values are `(cookie value, attributes)` tuples. Within attributes, unary attributes (e.g. `HTTPOnly`) are indicated by a `None` value. Modifications to the MultiDictVi

(
        self,
    )

Source from the content-addressed store, hash-verified

1154
1155 @property
1156 def cookies(
1157 self,
1158 ) -> multidict.MultiDictView[str, tuple[str, multidict.MultiDict[str, str | None]]]:
1159 """
1160 The response cookies. A possibly empty `MultiDictView`, where the keys are cookie
1161 name strings, and values are `(cookie value, attributes)` tuples. Within
1162 attributes, unary attributes (e.g. `HTTPOnly`) are indicated by a `None` value.
1163 Modifications to the MultiDictView update `Response.headers`, and vice versa.
1164
1165 *Warning:* Changes to `attributes` will not be picked up unless you also reassign
1166 the `(cookie value, attributes)` tuple directly in the `MultiDictView`.
1167 """
1168 return multidict.MultiDictView(self._get_cookies, self._set_cookies)
1169
1170 @cookies.setter
1171 def cookies(self, value):

Callers

nothing calls this directly

Calls 1

_set_cookiesMethod · 0.95

Tested by

no test coverage detected