Module Net
In: lib/standard/facets/net/http.rb

Methods

Public Class methods

Returns a response object for the given URL or raises an exception with the appropriate error status code if unable to complete the request

  Net.download('http://example.com/')
  Net.download('http://example.com/', 2) # fail after 2 redirects

CREDIT: Daniel Huckstep

Downloads a given URL and saves it to disk at the specified path. If path is not provided or nil, then the last segment in the path of the URL is used as the file name.

Takes a third parameters as a hash of options:

CREDIT: Daniel Huckstep

[Validate]