MCPcopy Create free account
hub / github.com/PerroEngine/Perro / save_cookie_value

Function save_cookie_value

perro_source/api_modules/perro_web/src/storage.rs:179–184  ·  view source on GitHub ↗
(key: &str, value: &str)

Source from the content-addressed store, hash-verified

177
178#[cfg(target_arch = "wasm32")]
179fn save_cookie_value(key: &str, value: &str) -> io::Result<()> {
180 let encoded = cookie_encode(value);
181 document()?
182 .set_cookie(&format!("{key}={encoded}; path=/; SameSite=Lax"))
183 .map_err(js_err)
184}
185
186#[cfg(target_arch = "wasm32")]
187fn remove_cookie_value(key: &str) -> io::Result<()> {

Callers 1

save_bytes_implFunction · 0.85

Calls 2

cookie_encodeFunction · 0.85
documentFunction · 0.85

Tested by

no test coverage detected