Module: RestClient::Mixin::Response::ClassMethods
- Defined in:
- lib/restclient/mixin/response.rb
Instance Method Summary collapse
Instance Method Details
#beautify_headers(headers) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/restclient/mixin/response.rb', line 36 def beautify_headers(headers) headers.inject({}) do |out, (key, value)| beautiful_key = key.gsub(/-/, '_').to_sym out[beautiful_key] = beautiful_key == :set_cookie ? value : value.first out end end |