[squeak-dev] Question about WebResponse>>#contentStream

Chris Muller asqueaker at gmail.com
Fri Jun 6 21:50:59 UTC 2014


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?


More information about the Squeak-dev mailing list