> > the problem here is that HTTPSocket httpGet: '' return
> > a RWBinaryOrTextStream.
> > To get the string, you need to send the message contents to the stream.
> > (HTTPSocket httpGet: 'json url') contents
> >
>
> thanks!
>
> just getting back to this..
>
> my question is.. how do i know what pa
> the problem here is that HTTPSocket httpGet: '' return
> a RWBinaryOrTextStream.
> To get the string, you need to send the message contents to the stream.
> (HTTPSocket httpGet: 'json url') contents
>
thanks!
just getting back to this..
my question is.. how do i know what part of the stream to
(HTTPSocket httpGet: aUrl) contents
I know we Smalltalkers like to talk about how no one ever gets confused
about dynamic types, but it does happen ;-).
The stream has the text you want. May want to familiarize yourself with core
methods on the Stream hierarchy.
Pushing the Stream through a Byte
Hi Sergio,
2010/3/24 sergio_101
> i am currently using HTTPSocket to pull data from a url...
>
> looks like this:
>
>| data |
>data := String
>fromByteArray: (HTTPSocket httpGet: anUrl).
>
the problem here is that HTTPSocket httpGet: '' return
a R
i am currently using HTTPSocket to pull data from a url...
looks like this:
| data |
data := String
fromByteArray: (HTTPSocket httpGet: anUrl).
i end up with a string that has my desired data (a JSON string), but,
it's preceeded by this:
'a RWBina