[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Me want cookie.

From: Mortimer Cladwell
Subject: Re: Me want cookie.
Date: Mon, 18 Jan 2021 03:01:42 -0500

With (options #:cookies #t), (:cookies-value rc  "prjid") ==> 1000

On Sun, Jan 17, 2021 at 9:40 AM Nala Ginrut <> wrote:

Mortimer Cladwell writes:

> Thanks Nala,
> Looks like :cookies-remove! is now working.
> :cookies-value is not.  When evaluated the cookie name is returned, not the
> value i.e.
> (:cookies-value rc  "prjid") ==> "prjid"

I see.
In the older design of Artanis, users don't have to init #:cookies to
use cookie. But now it's changed, if users don't init #:cookies then
cookie doesn't work correctly.
I've added the check, so if users forget to init #:cookies, then it

In your case, you just want to use the cookies from the client, then
just init it as `#:cookies #t'.

Please pull the code first.

> I still don't understand the purpose of (:cookies-ref rc 'prjid "prjid")?
> It gives the same results as :cookies-check
> Thanks
> Mortimer

Yes, they have similar result, but in different purpose.

If you just created a cookie in the server-side, and you want to ref it,
you should use :cookies-ref. In this situation, the cookie only exits in
the server-side before you return the response to the client. The client
will not create the cookie before you return from server.

If you want to get cookie sent from the client, you should use
:cookies-value or :cookies-check. In this situation, the cookie exits in
the client and was sent to the server.

GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

reply via email to

[Prev in Thread] Current Thread [Next in Thread]