Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Net::HTTPHeader#to_hash

to_hash

Returns a Hash consisting of header names and array of values. e.g. {“cache-control” => [“private”],

"content-type" => ["text/html"],
"date" => ["Wed, 22 Jun 2005 22:11:50 GMT"]}
See also #sub_type #type_params #set_range also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0