Crate cookie_monster

Crate cookie_monster 

Source
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

  • jiff

    Adds support for the jiff crate. This exposes methods to Cookie to retreive the Expires and Max-Age attributes with jiff specific types.

  • chrono

    Adds support for the chrono crate. This exposes methods to Cookie to retreive the Expires and Max-Age attributes with chrono specific types.

  • time

    Adds support for the time crate. This exposes methods to Cookie to retreive the Expires and Max-Age attributes with time specific types.

  • percent-encode

    Parse/serialize Cookies that are percent-encoded.

  • axum

    Adds integration with the axum crate. Implements FromRequestParts, IntoResponse and IntoResponseParts,

  • http

    Adds integration with the http crate. Create a CookieJar from a HeaderMap. Write a CookieJar to a HeaderMap.

§Honorable mention

This crate takes a lot of inspiration from the cookie crate.

Structs§

Cookie
An HTTP Cookie.
CookieBuilder
A builder struct for building a Cookie.
CookieJar
A generic CookieJar for cookie management. Can be used to read update or delete cookies from a user session.

Enums§

Error
All errors that can be returned while parsing or serializing cookies.
Expires
The Expires attribute.
SameSite
The SameSite attribute.