Created
June 11, 2014 12:46
-
-
Save phil/b88b65f6a590f2e31d6f to your computer and use it in GitHub Desktop.
Ruby Core Library HTTP Response example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
(1..20).each do |i| | |
response = Net::HTTP.get_response(URI("http://kyan.com")) | |
puts "#{i}: #{response.code}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment