cookie-monster 0.2.2

A Cookie library for managing HTTP Cookies, with Axum integration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use cookie_monster::Cookie;

use crate::assert_eq_ser;

#[test]
fn http_only() {
    assert_eq_ser!(
        Cookie::build("foo", "bar").http_only().build(),
        Ok("foo=bar; HttpOnly")
    );
    assert_eq_ser!(
        Cookie::build("foo", "").http_only().build(),
        Ok("foo=; HttpOnly")
    );
}