[Newbies] problems pulling data from a url..

sergio_101 sergiolist at village-buzz.com
Wed Mar 24 05:44:21 UTC 2010


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 RWBinaryOrTextStream ' '<here is the stuff i need>' ' '

i am trying to lop off the first part by doing:

jsonData := dataString replaceAll:  'RWBinaryOrTextStream' with: 'test'.

just to see if i can touch the string..

but no matter what i do, i can't get any parts of the string to be raplaced..

it almost looks like there are three strings in there..

the RWBinaryOrTextStream one, the one i need, and an empty one..

is there a better way to pull a url?

thanks!


-- 

----
peace,
sergio
photographer, journalist, visionary

http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


More information about the Beginners mailing list