Module: RestClient::Mixin::Response::ClassMethods
- Defined in:
- lib/restclient/mixin/response.rb
Instance Method Summary collapse
Instance Method Details
#beautify_headers(headers) ⇒ Object
55 56 57 58 59 60 |
# File 'lib/restclient/mixin/response.rb', line 55 def beautify_headers(headers) headers.inject({}) do |out, (key, value)| out[key.gsub(/-/, '_').downcase.to_sym] = %w{set-cookie}.include?(key.downcase) ? value : value.first out end end |