Re: [twsocket] Cookie Manager
From: Daniele Rocchi desroc...@gmail.com I tried uploading here http://www.filefactory.com/file/ca95793/n/CookiesManager.pas The file is no longer available, it was a year ago. If Daniele is still here can you please email it to me directly, or anyone else that downloaded it. I've just created a new demo for THtmlViewer using ICS, works fine but the old demo used the Indy Cookie Manager and now ICS really needs one. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Cookie Manager
Hello Daniele, The listserver doesn't accept attachments. Maybe you can upload the file to some webserver and post the URL here. IMO a cookie manager is a valuable contribution and has been requested several times over the past years. -- Arno Garrels Daniele Rocchi wrote: Hi everyone, since I needed one for my own project, I built a class to manage cookies from http/https requests. I've never created a component so I'm not sure I'm doing things the right way but I tried it on a sample program to log-in into a site and it seems to work. At the moment it is a completely separated component but I guess it shouldn't take long to interface it with the THttpCli/TSslHttpCli components. It has a few function that I think are self explanatory. I planned them thinking about the component being interfaced with the THttpCli/TSslHttpCli ones. To use it in my sample program I just fire CookieManager.AddStringAsCookie(String) in the OnCookie event. procedure TForm1.HttpCli1Cookie(Sender: TObject; const Data: String; var Accept: Boolean); begin CookieManager.AddStringAsCookie(Data, HttpCli1.URL); end; Hope it's useful. Daniele -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Cookie Manager
Oh, sorry. I tried uploading here http://www.filefactory.com/file/ca95793/n/CookiesManager.pas Daniele On 8 April 2011 19:35, Arno Garrels arno.garr...@gmx.de wrote: Hello Daniele, The listserver doesn't accept attachments. Maybe you can upload the file to some webserver and post the URL here. IMO a cookie manager is a valuable contribution and has been requested several times over the past years. -- Arno Garrels Daniele Rocchi wrote: Hi everyone, since I needed one for my own project, I built a class to manage cookies from http/https requests. I've never created a component so I'm not sure I'm doing things the right way but I tried it on a sample program to log-in into a site and it seems to work. At the moment it is a completely separated component but I guess it shouldn't take long to interface it with the THttpCli/TSslHttpCli components. It has a few function that I think are self explanatory. I planned them thinking about the component being interfaced with the THttpCli/TSslHttpCli ones. To use it in my sample program I just fire CookieManager.AddStringAsCookie(String) in the OnCookie event. procedure TForm1.HttpCli1Cookie(Sender: TObject; const Data: String; var Accept: Boolean); begin CookieManager.AddStringAsCookie(Data, HttpCli1.URL); end; Hope it's useful. Daniele -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Cookie Manager
Daniele, great! Built-in coookie manager would be a great improvement! Looked quickly at your unit. You have many code in StringToCookie that formats date, but OverbyteIcsHttpProt.pas already has functions RFC1123_Date and RFC1123_StrToDate -- Anton -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Cookie Manager
Really?!? It took me 2 hours to find out that StrToDateTime wouldn't do it and decided to interpret the string myself... and now you tell me there'a a function for that? :P I'll correct it as soon as I have time. Thanks. Daniele On 8 April 2011 22:10, Anton S. an...@rambler.ru wrote: Daniele, great! Built-in coookie manager would be a great improvement! Looked quickly at your unit. You have many code in StringToCookie that formats date, but OverbyteIcsHttpProt.pas already has functions RFC1123_Date and RFC1123_StrToDate -- Anton -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be