get_response(uri_or_host, path = nil, port = nil, &block)
Class Public methods
Sends a GET request to the target and returns the HTTP response as a Net::HTTPResponse object. The target can
either be specified as (uri
), or as (host
,
path
, port
= 80); so:
1 2 | print res.body |
or:
1 2 | res = Net:: HTTP .get_response( 'www.example.com' , '/index.html' ) print res.body |
Please login to continue.