Class: Faraday::Adapter::EMSynchrony::Header
- Includes:
- Net::HTTPHeader
- Defined in:
- lib/faraday/adapter/em_synchrony.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(response) ⇒ Header
Returns a new instance of Header.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/faraday/adapter/em_synchrony.rb', line 10 def initialize response @header = {} response.response_header.each do |key, value| case key when "CONTENT_TYPE"; self.content_type = value when "CONTENT_LENGTH"; self.content_length = value else; self[key] = value end end end |