Expand description
An HTTP Cookie crate.
§Overview
Exposes types like Cookie and CookieJar for working with HTTP cookies. This crate
focuses on server side applications. The main goals are simplicity and ease of use.
§Usage
Add cookie-monster in your Cargo.toml:
[dependencies]
cookie-monster = "0.1"§Features
-
jiffAdds support for the jiff crate. This exposes methods to
Cookieto retreive theExpiresandMax-Ageattributes with jiff specific types. -
chronoAdds support for the chrono crate. This exposes methods to
Cookieto retreive theExpiresandMax-Ageattributes with chrono specific types. -
timeAdds support for the time crate. This exposes methods to
Cookieto retreive theExpiresandMax-Ageattributes with time specific types. -
percent-encodeParse/serialize
Cookies that are percent-encoded. -
axumAdds integration with the axum crate. Implements
FromRequestParts,IntoResponseandIntoResponseParts, -
httpAdds integration with the http crate. Create a
CookieJarfrom aHeaderMap. Write aCookieJarto aHeaderMap.
§Honorable mention
This crate takes a lot of inspiration from the cookie crate.
Structs§
- Cookie
- An HTTP Cookie.
- Cookie
Builder - A builder struct for building a
Cookie. - Cookie
Jar - A generic
CookieJarfor cookie management. Can be used to read update or delete cookies from a user session.