[Newbies] I can't find any HTTPSocket examples.
Sander.Hansen at gmail.com
Thu Oct 2 10:05:49 UTC 2014
So I'm doing a schoolproject in which we have to modify scratch, which is
done using squeak. The problem is the teacher thought it was made in python
(Because that's how you add mods) and as such we suddenly have a somewhat
rushed assignment in a language we have no experience with.
The problem isn't we really don't have time to learn the smalltalk and the
modication is not very heavy, so I originally hoped to just find a few
examples of how to do stuff and mostly just modify them to our needs. What
I'm trying to achieve is relatively simple, calling a .php file on our
server. It doesn't take any arguments and doesn't return anything, so I
simply just need the server to realize the script is getting called.
I originally wanted to do it using HTTPClient, but my squeak doesn't seem to
have this library. I found HTTPSocket however and it seemed to be able to do
the job just fine, except I have no idea how to use the class. Everything I
try I just get a different error and I'm not sure where to go from here. So
any example or just help on how to use the instance/class would be highly
appreciated. An attempt I have tried is this one:
"Used to upload the game"
HTTPSocket httpGet: 'http://shgamecrew.dk'.
It seems like HttPSocket doesn't need to be instantiated from what I've
gathered, so I thought this would be enough, but alas it seems not. I get a
PrimitiveFailed error (Which I have also no idea what means).
View this message in context: http://forum.world.st/I-can-t-find-any-HTTPSocket-examples-tp4781987.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
More information about the Beginners