End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Net::HTTPHeader#[]
[](key)
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/net/http/header.rb, line 38
def [](key)
a = @header[key.downcase.to_s] or return nil
a.join(', ')
end
Returns the header field corresponding to the case-insensitive key. For example, a key of “Content-Type” might return “text/html”