1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Uses Hash to convert array to hash

This commit is contained in:
AjitSingh 2018-08-17 22:58:38 +05:30
parent 59d85c3c94
commit 4dbe9bbb15

View file

@ -571,10 +571,12 @@ module HTTParty
end
def process_dynamic_headers(headers)
headers.map do |header, value|
headers = headers.map do |header, value|
value = value.respond_to?(:call) ? value.call : value
[header, value]
end.to_h
end
Hash[headers]
end
def process_cookies(options) #:nodoc: