Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] R: Re: Reading and setting cookies

From: gchillemi:aliceposta:it at: 20-Nov-2005 13:35

Ciao Sunanda, I am on the client side of the thing. I want to access pages located in a remote server and I need to accept a cookie and make a login. I am taking a look at http-tools.r but it does not set the data as promised: http-tools-data/cookie-data is empty. Giuseppe Chillemi -----Messaggio originale----- Da: rebol-bounce-rebol.com [mailto:rebol-bounce-rebol.com] Per conto di SunandaDH-aol.com Inviato: domenica 20 novembre 2005 11.13 A: rebolist-rebol.com Oggetto: [REBOL] Re: Reading and setting cookies Giuseppe :
> I need to read and set cookies when accessing pages. How can I do this
? Setting a cookie is as simple as printing the right HTTP header: print "set-cookie: ....." Reading the cookie means looking in a CGI header cookie-value: select system/options/cgi/other-headers "HTTP_COOKIE" [It's slightly more complicated if you want to use multiple cookies of type 2 for any one visitor.] Some sample code and (incomplete) notes on it here: http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?color=yes&script=co ok ie-example.r http://www.rebol.org/cgi-bin/cgiwrap/rebol/documentation.r?script=cookie-exa mp le.r Sunanda.