How can I do a partial download with HTTP?

The HTTP/1.1 provides support for partial downloads. (Section 14.36 of RFC 2068) To partially download a file you should specify the byte range in the Range property.


     'the actual byte range
     HTTP1.Range = "0-499" 'get only the first 500 bytes
     HTTP1.Get URL

The format of the Range property consist of a range of bytes specified by two numbers separated by '-' (e.g. "0-499") For example: First 500 bytes 0-499 Second 500 bytes 500-999 Final 500 bytes -500

Older versions of IPWorks do not contain a Range property and must use the OtherHeader property to manually set this header, as well as setting the HTTP/1.1 protocol in the HTTPVersion property.

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.