Re: Session handling for http clients
Torbjörn Lager <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CA+Y3JZhba3490gmu0YW--0=kEw4bq9GSm6wckthdCKTNAhzOLQ@mail.gmail.com> |
Works! Thanks, Torbjörn On Mon, Aug 5, 2013 at 6:03 PM, Jan Wielemaker <[email protected]> wrote: > On 08/04/2013 03:30 PM, Torbjörn Lager wrote: >> I'm trying to make two or more http request in a row to a >> session-enabled Prolog web api from a client implemented by means of >> http_open/3. Roghly like so: >> >> ... >> http_open('http://domain.org/first', Stream1, []), >> ... >> http_open('http://domain.org/second', Stream2, []), >> ... >> >> The thing is that I need the two request to be part of the same http >> session. Just making the requests doesn't ensure that they are. How >> can I solve this? > > I _think_ all you need to do is load library(http/http_cookie). There > are some options there for more advanced cookie processing, but the > default might do find. > > Cheers --- Jan > >> >> Cliopatria has a file sesame_client.pl that seems to do what I want, >> but there's a lot of code there and it got me lost. :-( >> >> Thanks, >> Torbjörn >> -- Torbjörn Lager Professor of General and Computational Linguistics Department of Philosophy, Linguistics and Theory of Science University of Gothenburg Box 200, SE-405 30 Gothenburg, Sweden Phone: +46317864962