Created
October 12, 2018 18:52
-
-
Save kopylovvlad/4d76e0b4f40ade786c84430d806b9b4a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'open-uri' | |
urls = [ | |
'https://www.google.com/', | |
'https://www.youtube.com/', | |
'http://www.rubyflow.com', | |
'https://rubyonrails.org/' | |
] | |
urls.each do |url| | |
resp = open(url) | |
puts "#{url} has content length #{resp.read.size} symbols" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment