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#canonical_each
canonical_each
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/net/http/header.rb, line 211
def each_capitalized
block_given? or return enum_for(__method__) { @header.size }
@header.each do |k,v|
yield capitalize(k), v.join(', ')
end
end
Alias of #each_capitalized
As for each_header, except the keys are provided in capitalized form.
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.
See also
#each_capitalized
#basic_encode
#capitalize
#basic_auth
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1