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

Reply via email to