Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Net::HTTPHeader#proxy_basic_auth
proxy_basic_auth(account, password)
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/net/http/header.rb, line 956
def proxy_basic_auth(account, password)
@header['proxy-authorization'] = [basic_encode(account, password)]
end
Sets header 'Proxy-Authorization' using the given account and password strings:
Example
req.proxy_basic_auth('my_account', 'my_password') req['Proxy-Authorization'] # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="