Liking cljdoc? Tell your friends :D

sparkledriver.cookies


browser-cookies->mapclj

(browser-cookies->map browser)

Convert browser's current cookies into the map format used by clj-http. This returns cookies from all domains, but cookie names that are set on multiple domains will only be returned once.

Convert `browser`'s current cookies into the map format used by clj-http. This returns cookies from all domains, but cookie names that are set on multiple domains will only be returned once.
sourceraw docstring

delete-all-cookies!clj

(delete-all-cookies! browser)

Clear all cookies from all domains.

Clear all cookies from all domains.
sourceraw docstring

delete-cookie!clj

(delete-cookie! browser name)
(delete-cookie! browser name domain)

Delete the named cookie from the given domain. When omitted domain defaults to the browser's current domain.

Delete the named cookie from the given domain. When omitted `domain` defaults to the `browser`'s current domain.
sourceraw docstring

set-cookie!clj

(set-cookie! browser name value & {domain :domain :as options})

Set a cookie with given name and value. If a cookie with the same name and domain is already present, it will be replaced. The following keyword arguments are supported.

  • :domain (String) The cookie domain, defaults to the current domain of the browser.
  • :expires-on (java.util.Date) Expiration date. Must be in the future or the cookie won't be stored.
  • :http-only (Boolean) Cookie's HttpOnly flag, disallow access from JavaScript
  • :secure (Boolean) Cookie's Secure flag, only serve over HTTPS.
  • :path (String) URL path of the cookie.
Set a cookie with given `name` and `value`. If a cookie with the same name and `domain` is already present, it will be replaced. The following keyword arguments are supported.

- `:domain` (String) The cookie domain, defaults to the current domain of the browser.
- `:expires-on` (java.util.Date) Expiration date. Must be in the future or the cookie won't be stored.
- `:http-only` (Boolean) Cookie's HttpOnly flag, disallow access from JavaScript
- `:secure` (Boolean) Cookie's Secure flag, only serve over HTTPS.
- `:path` (String) URL path of the cookie.
sourceraw docstring

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

× close