[fpc-pascal] Download file
pdavidson at coraxnetworks.com
Thu Nov 17 22:55:05 CET 2005
The silly answer. Construct an HTTP message according to IETF/W3C
Better answer. Assuming you have a socket connection open, the
following should be included
in your message:
Content-length:<number of byte in Content: below, as ASCII string>
Content-type:<text/ascii, or something similar><crlf>
The above should be in single string.
<crlf> means carriage return/line feed, or ASCII chars 10 and 13.
Content-type is important. text/ASCII will work in most situations.
Otherwise see MIME standards at http://www.ietf.org for more details.
Please note that is extra <crlf> after text headers. This is to
indicate that what follows is the data you want to transmit.
There are many other fields that can be added, depending on who is at
other end of connection, but the ones above should work in most
situation. This is NOT ACID compliant.
See http://www.w3.org/Protocols/ for more details on HTTP.
On Nov 17, 2005, at 16:18, dhkblaszyk at zeelandnet.nl wrote:
> I would like to download a file via HTTP, how can I achieve that in a
> platform independent way? What components to use and is there some code
> suited for dummy's available.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
Corax Networks Inc.
More information about the fpc-pascal