Method: Gem::Net::HTTPHeader#proxy_basic_auth
- Defined in:
- lib/rubygems/net-http/lib/net/http/header.rb
#proxy_basic_auth(account, password) ⇒ Object
Sets header 'Proxy-Authorization' using the given account and password strings:
req.proxy_basic_auth('my_account', 'my_password')
req['Proxy-Authorization']
# => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA=="
956 957 958 |
# File 'lib/rubygems/net-http/lib/net/http/header.rb', line 956 def proxy_basic_auth(account, password) @header['proxy-authorization'] = [basic_encode(account, password)] end |