I\'m building this class to download files in parts/sections/segments. In .NET 4.0, I can use this code to specify the range to download from
long startPos =
I believe the documentation gives some insight into that:
An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:
Range: bytes=-99\r\n\r\n
For this example, the rangeSpecifier parameter would be specified as "bytes" and the range parameter would be -99.
Then there is also this from Wikipedia:
Range
Request only part of an entity. Bytes are numbered from 0.
Range: bytes=500-999
So the code that you would result on the example above is
HttpWebRequest.AddRange("bytes", 500, 999);