Get body of response : net http library « Network « Ruby
- Ruby
- Network
- net http library
Get body of response
require 'net/http'
url = URI.parse('http://www.rubyinside.com/test.txt')
response = Net::HTTP.get_response(url)
puts response.body
Related examples in the same category