Net::HTTP has what you need.
http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/
Something along these lines should do it (untested!):
require ''net/http''
Net::HTTP.start(''www.example.com'', 80) { |http|
response = http.get(''/index.html'')
File.new(''index.html'',
''w'').puts(response.body)
}
Cheers!
-DF
On 10/12/05, Gary Lin <garychlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> HI,
>
> I''m wondering Is there any wget like helper before I start to
write it
> myself?
>
> For example: wget
> http://web.rubyonrails.com/images/rails_logo_remix.gif"
> will save rails_logo_remix.gif to local disk.
>
> Thanks.
>
> Gary
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>