You need to parse the header on OnHeaderEnd. First store it in a class variable in OnHeaderData. Notice that this event is called each time a header line comes.
Regards, SZ ----- Original Message ----- From: "Me" <[EMAIL PROTECTED]> To: "ICS support mailing" <firstname.lastname@example.org> Sent: Thursday, December 08, 2005 8:42 PM Subject: Re: [twsocket] File download ---- Wiadomość Oryginalna ---- Od: Francois Piette <[EMAIL PROTECTED]> Do: ICS support mailing <email@example.com> Data: Thu, 8 Dec 2005 10:36:25 +0100 Temat: Re: [twsocket] File download > > Hmm... How do i download a file and save it on disk? Got the > > RcvdStream and... what? How do i save it to file? I thought that > > stream.savetofile would work but there is no such a thing... > > Just assign a TFileStream to RcvdStream and you have a file. That's the beauty of TStream and > derived classes. > > Something like (just typing out of my head, not tested): > > HttpCli1.URL := 'http://www.overbyte.be'; > HttpCli1.RcvdStream := TFileStream.Create('overbyte.html', fmCreate); > HttpCli1.Get; > HttpCli1.RcvdStream.Free; > HttpCli1.RcvdStream := nil; > Sounds cool but... if the file is being downloaded from forum... i wouldlike to recive its name and save under the name given by server... any idea how? -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be