Created
June 9, 2016 20:32
-
-
Save KrakenHH/acacaf6cd0ffaac70a4a9ffc6520bd32 to your computer and use it in GitHub Desktop.
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
Net::HTTP.start('www.rubyinside.com') do |http| | |
req = Net::HTTP::Get.new('/test.txt') | |
puts http.request(req).body | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is the third line not puts req.body
What is |http|
Why does it need to be http.request(req).body instead of req.body?