From: Rasmus Debitsch Date: 2005-08-19T00:01:15+09:00 Subject: Re: Geturl with net/http package Now it works. Sometimes it is so easy. Thanks, Rasmus "Mohit Muthanna" schrieb im Newsbeitrag news:fdb3980a05081713547af1fd61@mail.gmail.com... Remove the 'http://' from the 'server' variable. On 8/17/05, Rasmus Debitsch wrote: > Hello, > > I want to retrieve an image from the world wind server using the Ruby http > package. But I can't get it work. In tcl/tk it works like this: > > package require http > set url "http://data.worldwind.arc.nasa.gov/t?T=105&L=0&X=81&Y=48" > set token [::http:geturl $url] > upvar #0 $token state > > and the jpeg image is in the state(body) variable. Using Ruby I expected > something like this: > > require 'net/http' > server = 'http://data.worldwind.arc.nasa.gov' > request = '/t?T=105&L=0&X=81&Y=48' > http = Net::HTTP.new(server) > http.start > resp,data = http.get(request, nil) > http.finish > > But http.start returns "SocketError: getaddrinfo: no address associated > with > hostname." always. Is there a command like geturl in the net/http package? > -- > Rasmus > > > > -- Mohit Muthanna [mohit (at) muthanna (uhuh) com] "There are 10 types of people. Those who understand binary, and those who don't."