Closed adamneilson closed 10 years ago
Quite a trivial thing but the docs state that you can add the following:
(cookies/put! :track {:value (str (java.util.UUID/randomUUID)) :path "/" :expires 1})
But what I've found is that the :expires attribute must be a string rather than an int otherwise it throws an exception:
:expires
java.lang.AssertionError: Assert failed: (every? valid-attr? attrs)
I'm not sure if the docs need updating to reflect that or whether it's a bug in the lib where it should take the int without complaining.
Thanks!
It appears that Ring requires the expires key to either be a DateTime or a string. I think the documentation should be updated as I don't believe it would be a good idea to coerce the value automatically.
expires
DateTime
string
Quite a trivial thing but the docs state that you can add the following:
But what I've found is that the
:expires
attribute must be a string rather than an int otherwise it throws an exception:I'm not sure if the docs need updating to reflect that or whether it's a bug in the lib where it should take the int without complaining.
Thanks!