Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Net::HTTPHeader#proxy_basic_auth

(::String account, ::String password) -> void
proxy_basic_auth(account, password)

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=="
See also #main_type #range #key? #range= also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0