
09-30-2008, 01:12 PM
|
 |
Underclocked lifestyle
Forum Leader * Guru *
|
|
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,184
|
|
|
To do something like update progress you have to use the object asynchronously. As data arrives you write it to disk or assemble it in chunks.
The simple example attached shows how to do this, discarding the response data but logging events as they occur. Note that you don't always get a length returned, so sometimes you have to fake a progress bar.
An example of this would be the page at http://www.google.com/ which is sent with chunked Transfer-Encoding, though the main image on that page is sent with a Content-Length header.
|
|