Module wasm_cookies::cookies

source ·
Expand description

This module provides the same functions as the root module, but which don’t operate directly on the browser’s cookie string, so it can be used outside a browser.

Instead of reading the browser’s cookie string, functions in this module take it as an argument. Instead of writing to the browser’s cookie string, they return it.

Structs

Enums

URI decoding error on a key or a value, when calling wasm_cookie::all.
SameSite value for CookieOptions.

Functions

Returns all cookies, with URI decoded keys and values (with the urlencoding crate), or an error if URI decoding fails on a key or a value.
Returns all cookies as key-value pairs, with URI decoded keys and values (with the urlencoding crate), or an error if URI decoding fails on a key or a value.
Returns all cookies as key-value pairs, with undecoded keys and values.
Returns all cookies, with undecoded keys and values.
Return the cookie string that deletes a cookie, URI encoding its name.
Return the cookie string that deletes a cookie without encoding its name.
If it exists, returns URI decoded cookie (with the urlencoding crate) or an error if the value’s URI decoding fails.
Returns undecoded cookie if it exists.
Return the cookie string that sets a cookie, with URI encoded name and value (with the urlencoding crate).
Return the cookie string that sets a cookie, with non encoded name and value.