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#each_capitalized_name
each_capitalized_name() { |key| ... }
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/net/http/header.rb, line 167
def each_capitalized_name #:yield: +key+
block_given? or return enum_for(__method__) { @header.size }
@header.each_key do |k|
yield capitalize(k)
end
end
Iterates through the header names in the header, passing capitalized header names to the code block.
Note that header names are capitalized systematically; capitalization may not match that used by the remote HTTP server in its response.
Returns an enumerator if no block is given.