luminus-framework/luminus

Example code for setting cookies

Opened this issue · 1 comments

The documentation for cookies shows that cookies can be set like this:

(-> "cookie set" response (update-in [:cookies "username" :value] "Alice"))

I don't think (response "cookie set") makes sense and "Alice" cannot be used as a function for update-in. I think the example can be simply this:

(assoc-in response [:cookies "username" :value] "Alice")

Do I understand it correctly?

Ah yeah that's definitely a typo, thanks for noticing. The "cookie set" is just the response body, that would be whatever is actually returned by the response handler.