End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Net::HTTPHeader#basic_auth
basic_auth(account, password)
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/net/http/header.rb, line 856
def basic_auth(account, password)
@header['authorization'] = [basic_encode(account, password)]
end
Set the Authorization: header for “Basic” authorization.
See also
#append_field_value
#basic_encode
#add_field
#canonical_each
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0