Skip to content

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

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.