get(uri_or_host, path = nil, port = nil)
Class Public methods
Sends a GET request to the target and returns the HTTP response as a string. The target can either be
specified as (uri
), or as (host
,
path
, port
= 80); so:
print Net::HTTP.get(URI('http://www.example.com/index.html'))
or:
print Net::HTTP.get('www.example.com', '/index.html')
Please login to continue.