Forum: Ruby re net::http and htaccess

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Charlie Bowman (Guest)
on 2006-06-13 21:07
(Received via mailing list)
I should of googled authentication instead of htaccess.  Sorry for the
noise.  Here is the solution

Basic Authentication

    require 'net/http'

    Net::HTTP.start('') {|http|
      req ='/secret-page.html')
      req.basic_auth 'account', 'password'
      response = http.request(req)
      print response.body

Charlie Bowman
This topic is locked and can not be replied to.