Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Net::HTTPHeader#canonical_each
() { (::String, ::String) -> untyped } -> ::Hash[::String, ::Array[::String]]
() -> ::Enumerator[[ ::String, ::String ], ::Hash[::String, ::Array[::String]]]
canonical_each
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/net/http/header.rb, line 484
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
Like each_header, but the keys are returned in capitalized form.
Net::HTTPHeader#canonical_each is an alias for Net::HTTPHeader#each_capitalized.
See also
#each_capitalized
#basic_encode
#capitalize
#basic_auth
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0