Module: HttpClient::Mixin::Response::ClassMethods

Defined in:
lib/http_client/mixin/response.rb

Instance Method Summary collapse

Instance Method Details

#beautify_headers(headers) ⇒ Object



34
35
36
37
38
39
# File 'lib/http_client/mixin/response.rb', line 34

def beautify_headers(headers)
  headers.inject({}) do |out, (key, value)|
    out[key.gsub(/-/, '_').to_sym] = value.first
    out
  end
end