MCPcopy Create free account
hub / github.com/encode/starlette / delete_cookie

Method delete_cookie

starlette/responses.py:134–154  ·  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",
        partitioned: bool = False,
    )

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 partitioned: bool = False,
143 ) -> None:
144 self.set_cookie(
145 key,
146 max_age=0,
147 expires=0,
148 path=path,
149 domain=domain,
150 secure=secure,
151 httponly=httponly,
152 samesite=samesite,
153 partitioned=partitioned,
154 )
155
156 def _wrap_websocket_denial_send(self, send: Send) -> Send:
157 async def wrapped(message: Message) -> None:

Callers 2

appFunction · 0.95

Calls 1

set_cookieMethod · 0.95

Tested by 2

appFunction · 0.76