Classes
SetCookie
9
▼
A ``Set-Cookie`` directive attached to a Response.
SetCookie
9
▼
ASet-Cookiedirective attached to a Response.
Attributes
| Name | Type | Description |
|---|---|---|
name |
str
|
— |
value |
str
|
— |
max_age |
int | None
|
— |
path |
str
|
— |
domain |
str | None
|
— |
secure |
bool
|
— |
httponly |
bool
|
— |
samesite |
str
|
— |
Methods
to_header_value
0
str
▼
Serialize to a ``Set-Cookie`` header value string.
to_header_value
0
str
▼
def to_header_value(self) -> str
Returns
str
Functions
parse_cookies
1
dict[str, str]
▼
Parse a ``Cookie`` header value into a name-value dict.
Returns an empty dict …
parse_cookies
1
dict[str, str]
▼
def parse_cookies(header: str) -> dict[str, str]
Parse aCookieheader value into a name-value dict.
Returns an empty dict for empty or missing headers.
Parameters
| Name | Type | Description |
|---|---|---|
header |
str |
Returns
dict[str, str]