[Newbies] Re: I can't find any HTTPSocket examples.

David Corking lists at dcorking.com
Fri Oct 3 18:41:35 UTC 2014


On Fri, Oct 3, 2014 at 4:33 PM, Mytts wrote:

> I'm not entirely sure how to check wat version the image is, but i did find
> that it was created in a squeak 2.8 environment.

That is a Scratch image (as you said - sorry.) I guess Scratch 1.4 as
that was the last version of Scratch to be made in Squeak.

Brief comments on stack trace:

primNameResolverStatus was supposed to resolve the DNS name
shgamecrew.dk using some C code in your Squeak virtual machine. (You
probably figured that from the source code.)

Sadly I can't guess what went wrong with any confidence.

It looks to me like you used the GET method correctly, as your code
succeeds and retrieves your home page, on my Linux version of Scratch
1.4

    foo := HTTPSocket httpGet: 'http://shgamecrew.dk'

    foo inspect

It seems to me that something is the matter with your installation,
rather than your knowledge of Squeak. Check if your Scratch is able to
connect to the MIT server. As you are in a hurry I think that you
could get away with the dirty hack of hard coding the value of t6 as
your IP address 46.30.212.164 to bypass the name resolver.  But
naturally, that could only help if the problem is in the resolver,
rather than elsewhere in your networking stack.

Have fun!

David


More information about the Beginners mailing list