Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code for setting cookies #142

Open
jindrichmynarz opened this issue Jul 24, 2016 · 1 comment
Open

Example code for setting cookies #142

jindrichmynarz opened this issue Jul 24, 2016 · 1 comment

Comments

@jindrichmynarz
Copy link

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?

@yogthos
Copy link
Member

yogthos commented Jul 24, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants