Generate ring.middleware.cookies - compatible persistent cookies
Clojure
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/ring
test
.gitignore
README
project.clj

README

ring-persistent-cookies gives you ring.middleware.cookies compatible
cookies with an expiration date.

(use 'ring.persistent-cookies)
(use 'clj-time.core)

(defn my-handler [r]
   ;; process request r

   ;; return cookies seq in response to set new cookies
   {:cookies [(persistent-cookie :remember-me "value-to-remember" 
              (date-time 2020 01 01) {:path "/"})]
    :body "Cookies set"})

Copyright (C) 2011 Joost Diepenmaat, Zeekat Softwareontwikkeling

joost@zeekat.nl - http://joost.zeekat.nl/

Distributed under the Eclipse Public License, the same as Clojure.