instance method
Net::HTTPHeader#proxy_basic_auth
(::String account, ::String password) -> void
proxy_basic_auth(account, password)
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/net/http/header.rb, line 960
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=="