Return to Snippet

Revision: 10597
at January 5, 2009 10:20 by paramah


Updated Code
#!/usr/local/bin/ruby
require 'rubygems'
require 'curl-multi'


curl = Curl::Multi.new


on_success = lambda do |body|
  puts body
end

on_failure = lambda do |ex|
  puts 'Failure.'
  puts ex
end


curl.get('http://www.wp.pl', on_success, on_failure)
curl.select([],[]) while curl.size > 0;

Revision: 10596
at January 5, 2009 10:19 by paramah


Initial Code
#!/usr/local/bin/ruby
require 'rubygems'
require 'curl-multi'


curl = Curl::Multi.new


on_success = lambda do |body|
  puts body
end

on_failure = lambda do |ex|
  puts 'Failure.'
  puts ex
end


curl.get('http://www.wp.pl', on_success, on_failure)
curl.select([],[]) while curl.size > 0;

Initial URL

                                

Initial Description

                                

Initial Title
fetch site in ruby

Initial Tags
curl, ruby

Initial Language
Ruby