BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Http Client Demo

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Robert Gilland
Guest





PostPosted: Wed Nov 17, 2004 6:02 am    Post subject: Http Client Demo Reply with quote



Looking for a simple Http Client Demo ( Delphi )
that
1/ Lists directory contents of server
2/ Puts file to server.
3/ Gets file from server.

Regards,

Robert.



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Nov 17, 2004 9:16 am    Post subject: Re: Http Client Demo Reply with quote




"Robert Gilland" <robert.gilland (AT) basx (DOT) com.au> wrote


Quote:
1/ Lists directory contents of server

That is very tricky. Most HTTP servers do not support directory listings at
all. For the servers that do, there is no standard format for displayig
directory listings, so if you are planning on parsing the listing, all I can
say is good luck.


Gambit



Back to top
Robert Gilland
Guest





PostPosted: Wed Nov 17, 2004 10:32 pm    Post subject: Re: Http Client Demo Reply with quote



We are dealing with only a specific server so that shouldn't be a problem.
The problem is I have no example code that gives me a clue how to use
TIdHttp
Something that gives me a clue how to get a file, put a file and actually
receive
a directory listing.

Regards,

Robert.

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote

Quote:

"Robert Gilland" <robert.gilland (AT) basx (DOT) com.au> wrote in message
news:419ae989 (AT) newsgroups (DOT) borland.com...

1/ Lists directory contents of server

That is very tricky. Most HTTP servers do not support directory listings
at
all. For the servers that do, there is no standard format for displayig
directory listings, so if you are planning on parsing the listing, all I
can
say is good luck.


Gambit





Back to top
eshipman
Guest





PostPosted: Wed Nov 17, 2004 10:55 pm    Post subject: Re: Http Client Demo Reply with quote

In article <419bd17a (AT) newsgroups (DOT) borland.com>, [email]robert.gilland (AT) basx (DOT) com.au[/email]
says...
Quote:
We are dealing with only a specific server so that shouldn't be a problem.
The problem is I have no example code that gives me a clue how to use
TIdHttp
Something that gives me a clue how to get a file, put a file and actually
receive
a directory listing.


Is the server reachable from the internet? If so, post the URL and I'll
whip something up for you.

Back to top
Robert Gilland
Guest





PostPosted: Wed Nov 17, 2004 11:49 pm    Post subject: Re: Http Client Demo Reply with quote

Our network guru cannot do this securely at the moment.
But I just need an example from any public site ( or even a non existant
site ) of get and list dir.

Regards,

Robert.



"eshipman" <mr_delphi_developer@yahoo!!!.com> wrote

Quote:
In article <419bd17a (AT) newsgroups (DOT) borland.com>, [email]robert.gilland (AT) basx (DOT) com.au[/email]
says...
We are dealing with only a specific server so that shouldn't be a
problem.
The problem is I have no example code that gives me a clue how to use
TIdHttp
Something that gives me a clue how to get a file, put a file and
actually
receive
a directory listing.


Is the server reachable from the internet? If so, post the URL and I'll
whip something up for you.



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Nov 18, 2004 1:09 am    Post subject: Re: Http Client Demo Reply with quote


"Robert Gilland" <robert.gilland (AT) basx (DOT) com.au> wrote


Quote:
The problem is I have no example code that gives me
a clue how to use TIdHttp Something that gives me a
clue how to get a file

Simply call the Get() method specifying the full URL to the file and
providing a TStream to receive the file data into.

Quote:
put a file

That is a little bit more involved. Call the Post() method that takes a
TIdMultiPartDataStream instance as a parameter. You will have to
instantiate a TIdMultiPartDataStream and add the file information to it
before calling Post().

Quote:
and actually receive a directory listing.

That is the exact same as retreiving a file, except that you specify a
folder name instead of a filename, and then you will have to parse the HTML
that is returned into the TStream. Alternatively to providing a TStream,
you can call the overloaded version of Get() that returns a String instead.


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.