Class: Falcon::Adapters::Response

Inherits:
Async::HTTP::Response
  • Object
show all
Defined in:
lib/falcon/adapters/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(status, headers, body) ⇒ Response

Returns a new instance of Response.



26
27
28
29
30
31
# File 'lib/falcon/adapters/response.rb', line 26

def initialize(status, headers, body)
  # We normalize headers to be lower case:
  headers = headers.map{|key, value| [key.downcase, value]}.to_h
  
  super(nil, status, nil, headers, Output.wrap(headers, body))
end