MCPcopy
hub / github.com/encode/starlette / delete_cookie

Method delete_cookie

starlette/responses.py:134–152  ·  view source on GitHub ↗
(
        self,
        key: str,
        path: str = "/",
        domain: str | None = None,
        secure: bool = False,
        httponly: bool = False,
        samesite: Literal["lax", "strict", "none"] | None = "lax",
    )

Source from the content-addressed store, hash-verified

132 self.raw_headers.append((b"set-cookie", cookie_val.encode("latin-1")))
133
134 def delete_cookie(
135 self,
136 key: str,
137 path: str = "/",
138 domain: str | None = None,
139 secure: bool = False,
140 httponly: bool = False,
141 samesite: Literal["lax", "strict", "none"] | None = "lax",
142 ) -> None:
143 self.set_cookie(
144 key,
145 max_age=0,
146 expires=0,
147 path=path,
148 domain=domain,
149 secure=secure,
150 httponly=httponly,
151 samesite=samesite,
152 )
153
154 def _wrap_websocket_denial_send(self, send: Send) -> Send:
155 async def wrapped(message: Message) -> None:

Callers 1

appFunction · 0.95

Calls 1

set_cookieMethod · 0.95

Tested by 1

appFunction · 0.76