Question about WebResponse>>#contentStream

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Question about WebResponse>>#contentStream

Chris Muller-3
While working with Andreas' WebClient today, I couldn't use the
#contentStream of the WebResponse because it depends on the state of
the retrieval; and since the retrieval had already finished it got a
socket-closed error.  So instead of simply:

    myWebResponse contentStream

I have to write:

   myWebResponse content readStream

By contrast, the #streamTo:size:progress: checks whether content has
been already-retrieved and creates a transient readStream to stream
from there, if it has.

Wouldn't it be easier and more consistent if #contentStream behaved
that way too?