Jump to content

Capture Cookie


diegojmap

Recommended Posts

I need to capture the cookie of a page, in vcl with WebBrowser:

procedure TFrmxDemo.WebBrowserDocumentComplete (
   Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);
var
   document: IHTMLDocument2;
   cookies: String;
   arq: TextFile;
begin
   document: = WebBrowser.Document as IHTMLDocument2;
   if Assigned (document) then
     DtMdlDemo.vCookie: = document.cookie;

   if Pos ('https://esaj.tjsp.jus.br/push', WebBrowser.LocationURL ) >0 then
     FrmxDemo.Close
   else
     FrmxDemo.Top: = vTop;

end;

In unigui I'm trying to use URLFrame, is there any way I could capture the cookie? Can be with ExtEvents.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...