🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8210

Re: How to download a file WITHOUT using the FTP..only through HTTP..

#8210
From: Remy Lebeau (TeamB)
Date: Mon, 15 Nov 2004 23:25
31 lines
2168 bytes
"Oren Halvani" <Spam@Me-Please.com> wrote in message
news:4199363d@newsgroups.borland.com...

> Remy, please explain me: why do i need "USER", "PASS"
> inside InternetConnect( )  for HTTP ? i thought this is only
> needed for FTP, isn't it...?

No.  HTTP can have usernames and passwords as well.  If your server does not
require them, then simply set them to NULL.

> OK...but WHERE do i have to place:

Well, considering that I told you to REPLACE FtpGetFile() WITH
HttpOpenRequest() and HttpSendRequest(), then one should assume that I meant
for you to put them in the place where you are currently calling
FtpGetFile() and then get rid of FtpGetFile() altogether.

> before OR after the HttpOpenRequest( ) ?

After, since HttpSendRequest() requires the request handle that
HttpOpenRequest() returns.

> by the way, what is this "lpszHeaders" ?
> can i pass a NULL here if i just want to
> download a file...?

Again, PLEASE read the documentation in full.  Everything is explained.


Gambit
Technical Details
Message-ID: <41993a7a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41984e1e@newsgroups.borland.com> <4198ebfe$1@newsgroups.borland.com> <4199363d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f57c5862d590fb6d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41984e1e@newsgroups.borland.com> <4198ebfe$1@newsgroups.borland.com> <4199363d@newsgroups.borland.com>
Subject: Re: How to download a file WITHOUT using the FTP..only through HTTP..
Date: Mon, 15 Nov 2004 15:25:23 -0800
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41993a7a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1100561018 68.69.17.41 (15 Nov 2004 15:23:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail