get(uri_or_host, path = nil, port = nil)
public
Send a GET request to the target and
return the response as a string. The target can either be specified as
(uri), or as (host, path, port = 80);
so:
print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))
or:
print Net::HTTP.get('www.example.com', '/index.html')
Show source
def HTTP.get(uri_or_host, path = nil, port = nil)
get_response(uri_or_host, path, port).body
end