Module: Ci::WWW
- Defined in:
- lib/ci-go-nfo/www.rb,
lib/ci-go-nfo/www.rb
Defined Under Namespace
Modules: Go
Class Method Summary collapse
Class Method Details
.http(url, config) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ci-go-nfo/www.rb', line 11 def self.http(url, config) url = URI.parse(url) req = Net::HTTP::Get.new(url.path) req.basic_auth(config['user'], config['password']) unless config['user'].nil? Net::HTTP.start(url.host, url.port) {|http| http.request(req) } end |