From: ts Date: 2001-09-27T14:14:42+09:00 Subject: [ruby-talk:21761] Re: Accessing Internet thru proxy using NET:HTTP routines >>>>> "s" == spanton writes: s> My computer is behind a firewall, which prompts for a username & password. s> Can anyone help me the additional code to respond to the proxy in an s> automated fashion to access a Web site outside the firewall. In the documentation of http.rb you have === Basic Authentication require 'net/http' Net::HTTP.start( 'auth.some.domain' ) {|http| response , = http.get( '/need-auth.cgi', 'Authentication' => ["#{account}:#{password}"].pack('m').strip ) print response.body } In version 1.2 (Ruby 1.7 or later), you can write like this: require 'net/http' req = Net::HTTP::Get.new('/need-auth.cgi') req.basic_auth 'account', 'password' Net::HTTP.start( 'auth.some.domain' ) {|http| response = http.request( req ) print response.body } Guy Decoux