Re: How to set/get cookies?

Tim Mackinnon <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
Thanks - that #requestContext was the bit I was missing.

Is this documented anywhere obvious? I searched all over to find something and couldn't easily discover it. None of the tutorials dig into this, nor the Seaside book (I guess we could get it updated as I think seaside still has legs to it).

Possibly we could put a comment in WACookie - as I found it? Or maybe a more e2e test?

Tim

Sent from my iPhone

> On 3 May 2018, at 16:38, Johan Brichau <[email protected]> wrote:
> 
> Hi Tim,
> 
> Getting cookies, by accessing the WARequest instance from within your callback/rendering code:
> 
>    self requestContext request cookieAt: ‘myCookie'
> 
> Setting cookies, by accessing the WAResponse instance from within your rendering code:
> 
>    self requestContext response addCookie: 
>        (self requestContext newCookie
>                path:’/myApp';
>                key: ‘myCookie';
>                value: ‘myCookie').
> 
> Hope this puts you on your way!
> 
> Cheers
> Johan
> 
>> On 3 May 2018, at 12:28, Tim Mackinnon <[email protected]> wrote:
>> 
>> Hi - I’m trying to get back into seaside, and I’m trying to understand how you get/set cookies? I can see WACookie and WARequest has a #cookieAt: method - but I’m missing the key piece about where in your application lifecycle you can access these things to store for example a user preference (without going full hog with a database).
>> 
>> Tim
>> _______________________________________________
>> seaside mailing list
>> [email protected]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> _______________________________________________
> seaside mailing list
> [email protected]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.