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:
parent
59d85c3c94
commit
4dbe9bbb15
1 changed files with 4 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue