get

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')
doc_ruby_on_rails
2015-04-20 20:21:10
Comments
Leave a Comment

Please login to continue.