Skip to content

Instantly share code, notes, and snippets.

@sporkmonger
Created November 22, 2008 22:24
Show Gist options
  • Save sporkmonger/27958 to your computer and use it in GitHub Desktop.
Save sporkmonger/27958 to your computer and use it in GitHub Desktop.
# http://github.com/sporkmonger/retrieve/tree/master
require "retrieve/clients/http"
connections = {}
100.times do
Retrieve.open("http://google.com/", :connections => connections) do |resource|
puts resource.read[0..75] + "..."
end
end
# Note: persistent connections are used automatically for redirects on the same server/port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment