[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-03 Thread Esteban Maringolo
Thanks Sven! I don't know whether I'm going to use it, but it's good that the feature is there and I have the option of sharing such session among clients. Regards, Esteban A. Maringolo On Wed, Nov 3, 2021 at 1:06 PM Sven Van Caekenberghe wrote: > Maybe this helps: > > > https://github.com/s

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-03 Thread Sven Van Caekenberghe
Maybe this helps: https://github.com/svenvc/zinc/commit/d9fe41707b16748b9340540127ec5d77800856b6 > On 1 Nov 2021, at 21:22, Sven Van Caekenberghe wrote: > > > >> On 1 Nov 2021, at 20:03, Esteban Maringolo wrote: >> >> If I need to use cookies, would it make sense to keep a ZnUserAgentSessio

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-01 Thread Sven Van Caekenberghe
> On 1 Nov 2021, at 20:03, Esteban Maringolo wrote: > > If I need to use cookies, would it make sense to keep a ZnUserAgentSession > and assign it to each new client? I don't know or remember, my first reaction would be to say that it was not designed for that purpose, but maybe it could be

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-01 Thread Esteban Maringolo
If I need to use cookies, would it make sense to keep a ZnUserAgentSession and assign it to each new client? I'm asking this in case I have to share cookies between requests. But the session variable seems to be private in ZnClient given that it doesn't provide any setter. Regards, Esteban A. Ma

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-11-01 Thread Esteban Maringolo
Thank you Sven. I'll go with instantiating a new client for each request, the less state shared, the better :-) Regards! Esteban A. Maringolo On Fri, Oct 29, 2021 at 12:15 PM Sven Van Caekenberghe wrote: > Hi, > > > On 29 Oct 2021, at 15:42, Esteban Maringolo > wrote: > > > > Hi, > > > > I

[Pharo-users] Re: Strategies for (re)using HTTP client

2021-10-29 Thread Sven Van Caekenberghe
Hi, > On 29 Oct 2021, at 15:42, Esteban Maringolo wrote: > > Hi, > > I happened to me more than once that I have to create some REST service > "client" in which I usually wrap an HTTP client inside (ZnClient in this > case), and all the calls to the service, end up using the HTTP client, insi