Hi Sergio,<br><br><div class="gmail_quote">2010/3/24 sergio_101 <span dir="ltr">&lt;<a href="mailto:sergiolist@village-buzz.com">sergiolist@village-buzz.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
i am currently using HTTPSocket to pull data from a url...<br>
<br>
looks like this:<br>
<br>
        | data |<br>
        data := String<br>
                                fromByteArray: (HTTPSocket httpGet: anUrl).<br></blockquote><div><br></div><div>the problem here is that HTTPSocket httpGet: &#39;&#39; return a RWBinaryOrTextStream.</div><div><br></div><div>
To get the string, you need to send the message contents to the stream.</div><div><br></div><div>(HTTPSocket httpGet: &#39;json url&#39;) contents</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
i end up with a string that has my desired data (a JSON string), but,<br>
it&#39;s preceeded by this:<br></blockquote><div><br></div><div>yes because it&#39;s a stream, not a string.</div><div><br></div><div>hth, </div><div><br></div><div>Cédrick</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
&#39;a RWBinaryOrTextStream &#39; &#39;&lt;here is the stuff i need&gt;&#39; &#39; &#39;<br>
<br>
i am trying to lop off the first part by doing:<br>
<br>
jsonData := dataString replaceAll:  &#39;RWBinaryOrTextStream&#39; with: &#39;test&#39;.<br>
<br>
just to see if i can touch the string..<br>
<br>
but no matter what i do, i can&#39;t get any parts of the string to be raplaced..<br>
<br>
it almost looks like there are three strings in there..<br>
<br>
the RWBinaryOrTextStream one, the one i need, and an empty one..<br>
<br>
is there a better way to pull a url?<br>
<br>
thanks!<br>
<br>
<br>
--<br>
<br>
----<br>
peace,<br>
sergio<br>
photographer, journalist, visionary<br>
<br>
<a href="http://www.coffee-black.com" target="_blank">http://www.coffee-black.com</a><br>
<a href="http://www.painlessfrugality.com" target="_blank">http://www.painlessfrugality.com</a><br>
<a href="http://www.twitter.com/sergio_101" target="_blank">http://www.twitter.com/sergio_101</a><br>
<a href="http://www.facebook.com/sergio101" target="_blank">http://www.facebook.com/sergio101</a><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Cédrick <br>