Permalink
Browse files

Adding basic http authentication

  • Loading branch information...
karan18 committed Apr 10, 2012
1 parent e10665d commit 659871ffaef4206444ec8a2e83e21cb288b519e2
Showing with 1 addition and 0 deletions.
  1. +1 −0 apache_load/apache_load.rb
@@ -13,6 +13,7 @@ def build_report
url = URI.parse(option("server_url"))
req = Net::HTTP::Get.new(url.path + "?" + url.query.to_s)
http = Net::HTTP.new(url.host, url.port)
+ req.basic_auth(url.user, url.password)
http.use_ssl = url.is_a?(URI::HTTPS)
res = http.start() {|h|
h.request(req)

0 comments on commit 659871f

Please sign in to comment.