class Async::HTTP::Headers
def to_h
def to_h @fields.inject({}) do |hash, (key, value)| key = key.downcase if current_value = hash[key] hash[key] = Array(current_value) << value else hash[key] = value end hash end end
def to_h @fields.inject({}) do |hash, (key, value)| key = key.downcase if current_value = hash[key] hash[key] = Array(current_value) << value else hash[key] = value end hash end end