🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2206

Re: IdFTP problem

#2206
From: David Ayre
Date: Tue, 18 Jul 2006 10:09
47 lines
2282 bytes
Hi Remy,

I tried http and it worked OK. However, I have got TIdHTTP. Is
that the same as IfHTTP that you showed in your example below?
Also, is it possible to run a progress bar with HTTP as I did
with FTP?

Cheers,

David



>"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>>
>>"David Ayre" <davidcayre@ntlworld.com> wrote in message
>>news:44ba98f8$1@newsgroups.borland.com...
>>
>>> I'll have at look at that. Can I download files in the
>>> same way as I do with ftp?
>>
>>HTTP is a much more straight-forward protocol to work with than FTP.  There
>>are fewer calls involved, ie:
>>
>>    TFileStream *fs = new TFileStream("c:\\my folder\\update.dat",
>>fmCreate);
>>    try
>>    {
>>        try
>>        {
>>            IfHTTP1->Get("http://www.mysite.com/update.dat", fs);
>>        }
>>        __finally {
>>            delete fs;
>>        }
>>    }
>>    catch(const Exception &)
>>    {
>>        DeleteFile("c:\\my folder\\update.dat");
>>    }
>>
>>
>>Gambit
>>
>>
>
Technical Details
Message-ID: <44bcb359$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44b7b0d0$1@newsgroups.borland.com> <44b7c6f8$1@newsgroups.borland.com> <44b7ee96@newsgroups.borland.com> <44b7f43e$1@newsgroups.borland.com> <44b8a05a$1@newsgroups.borland.com> <44b8a74a@newsgroups.borland.com> <44b8acc2$1@newsgroups.borland.com> <44ba7c4c$3@newsgroups.borland.com> <44ba98f8$1@newsgroups.borland.com> <44bb061f$1@newsgroups.borland.com> <44bbaed3$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,117ad7250680adca
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "David Ayre" <davidcayre@ntlworld.com>
Sender: "David Ayre" <davidcayre@ntlworld.com>
Reply-To: "David Ayre" <davidcayre@ntlworld.com>
Subject: Re: IdFTP problem
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 62.252.224.18     
X-Forwarded-For: 81.96.132.239
References: <44b7b0d0$1@newsgroups.borland.com> <44b7c6f8$1@newsgroups.borland.com> <44b7ee96@newsgroups.borland.com> <44b7f43e$1@newsgroups.borland.com> <44b8a05a$1@newsgroups.borland.com> <44b8a74a@newsgroups.borland.com> <44b8acc2$1@newsgroups.borland.com> <44ba7c4c$3@newsgroups.borland.com> <44ba98f8$1@newsgroups.borland.com> <44bb061f$1@newsgroups.borland.com> <44bbaed3$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44bcb359$1@newsgroups.borland.com>
Date: 18 Jul 2006 03:09:29 -0700
X-Trace: newsgroups.borland.com 1153217369 207.105.83.66 (18 Jul 2006 03:09:29 -0700)
Lines: 48
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail