method

get

v1_8_6_287 - Show latest stable - Class: Net::HTTP
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')