 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Robert Gilland Guest
|
Posted: Wed Nov 17, 2004 6:02 am Post subject: Http Client Demo |
|
|
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
|
Posted: Wed Nov 17, 2004 9:16 am Post subject: Re: Http Client Demo |
|
|
"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
|
Posted: Wed Nov 17, 2004 10:32 pm Post subject: Re: Http Client Demo |
|
|
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
|
Posted: Wed Nov 17, 2004 10:55 pm Post subject: Re: Http Client Demo |
|
|
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
|
Posted: Wed Nov 17, 2004 11:49 pm Post subject: Re: Http Client Demo |
|
|
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
|
Posted: Thu Nov 18, 2004 1:09 am Post subject: Re: Http Client Demo |
|
|
"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.
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 |
|
 |
|
|
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
|
|