std.net.http.cookie
RFC 6265 cookies.
The Cookie type represents an RFC 6265 cookie, and is used for both parsing
and generating Cookie and Set-Cookie headers.
Parsing cookie strings
Parsing Cookie header values is done using Cookie.parse_request, while
Set-Cookie header values are parsed using Cookie.parse_response.
Generating cookie strings
Generating Cookie header values is done using Cookie.to_request, while
generating Set-Cookie header values is done using Cookie.to_response.
Cookie jar support
Support for a cookie jar along with domain and path matching is currently missing but planned.
Additional extensions
In addition to implementing cookies per RFC 6265, the following RFCs are also implemented:
- RFC 6265bis
(specifically the
SameSiteattribute)
Types
| Cookie | An RFC 6265 cookie. | |
| Value | ParseError | An error produced when parsing a |
| Value | SameSite | The value of the |