Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drjokepu/basic-cookies
Low-level RFC 6265 compatible cookie handling library for Rust.
https://github.com/drjokepu/basic-cookies
cookie cookies rfc-6265 rust
Last synced: about 1 month ago
JSON representation
Low-level RFC 6265 compatible cookie handling library for Rust.
- Host: GitHub
- URL: https://github.com/drjokepu/basic-cookies
- Owner: drjokepu
- License: mit
- Created: 2018-10-12T01:47:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T00:37:54.000Z (11 months ago)
- Last Synced: 2024-10-11T05:55:56.198Z (3 months ago)
- Topics: cookie, cookies, rfc-6265, rust
- Language: Rust
- Homepage:
- Size: 20.5 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# basic-cookies
Low-level [RFC 6265](https://tools.ietf.org/html/rfc6265.html) compatible cookie handling library for Rust.
[![Build Status](https://github.com/drjokepu/basic-cookies/actions/workflows/rust.yml/badge.svg)](https://github.com/drjokepu/basic-cookies/actions/workflows/rust.yml)
[![Docs](https://docs.rs/basic-cookies/badge.svg)](https://docs.rs/basic-cookies/)
[![crates.io](https://img.shields.io/crates/v/basic-cookies)](https://crates.io/crates/basic-cookies)
[![MIT](https://img.shields.io/crates/l/basic-cookies)](./LICENSE)## Usage Example
```rust
use basic_cookies::Cookie;let parsed_cookies = Cookie::parse("cookie1=value1; cookie2=value2").unwrap();
assert_eq!("cookie1", parsed_cookies[0].get_name());
assert_eq!("value1", parsed_cookies[0].get_value());assert_eq!("cookie2", parsed_cookies[1].get_name());
assert_eq!("value2", parsed_cookies[1].get_value());
```