Crates.io | nescookie |
lib.rs | nescookie |
version | 0.3.0 |
source | src |
created_at | 2021-07-21 02:36:23.810589 |
updated_at | 2021-11-28 01:12:26.905151 |
description | a netscape cookie file parser |
homepage | |
repository | https://github.com/snylonue/nescookie |
max_upload_size | |
id | 425355 |
size | 21,217 |
A netscape cookie file parser.
// open a file directly
let jar = nescookie::open("/path/to/cookie/file").unwrap();
// parse a string
let content = ".pixiv.net TRUE / TRUE 1784339332 p_ab_id 7\n";
let jar = nescookie::parse(content).unwrap();
// parse to an exist `CookieJar`
let builder = nescookie::CookieJarBuilder::with_jar(existed_jar);
// res is a `CookieJar`
let res = builder.open("/path/to/cookie/file").unwrap().finish(); // or builder.parse(content)...