Liking cljdoc? Tell your friends :D

benefactor.cookies

Cookie utilities. Uses transit to serialize and deserialize values.

Cookie utilities. Uses transit to serialize and deserialize values.
raw docstring

clear!cljs

(clear!)

Removes all cookies.

Removes all cookies.
sourceraw docstring

getcljs

(get key)
(get key default)

Given a key, gets the deserialized cookie value at the key. Accepts an optional default when value is not found.

Given a key, gets the deserialized cookie value at the key.
Accepts an optional default when value is not found.
sourceraw docstring

remove!cljs

(remove! key)

Given a key, removes the cookie key.

Given a key, removes the cookie key.
sourceraw docstring

set!cljs

(set! key val)
(set! key val {:keys [max-age path domain secure?] :as opts})

Given a key and a value, sets a cookie key to the serialized value. Accepts an optional map of options with the following keys: :max-age - defaults to -1 (in seconds) :path - path of the cookie, defaults to the full request path :domain - domain of the cookie, when null the browser will use the full request host name :secure? - boolean specifying whether the cookie should only be sent over a secure channel

Given a key and a value, sets a cookie key to the serialized value.
Accepts an optional map of options with the following keys:
:max-age - defaults to -1 (in seconds)
:path - path of the cookie, defaults to the full request path
:domain - domain of the cookie, when null the browser will use the full request host name
:secure? - boolean specifying whether the cookie should only be sent over a secure channel
sourceraw docstring

set-secure!cljs

(set-secure! key val)
(set-secure! key val opts)

Given a key and a value, sets a secure cookie. Accepts an optional map of options with the following keys: :max-age - defaults to -1 (in seconds) :path - path of the cookie, defaults to the full request path :domain - domain of the cookie, when null the browser will use the full request host name

Given a key and a value, sets a secure cookie.
Accepts an optional map of options with the following keys:
:max-age - defaults to -1 (in seconds)
:path - path of the cookie, defaults to the full request path
:domain - domain of the cookie, when null the browser will use the full request host name
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close