Class: Inferno::Entities::Request
- Inherits:
-
Object
- Object
- Inferno::Entities::Request
- Defined in:
- lib/davinci_pdex_test_kit/ext/inferno_core/request.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.to_hanami_response(request, response) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/davinci_pdex_test_kit/ext/inferno_core/request.rb', line 4 def self.to_hanami_response(request, response) response.status = request.status response.body = request.response_body request.response_headers.each do |header| response.headers[header.name] = header.value end response end |
Instance Method Details
#response_headers=(headers_hash) ⇒ Object
14 15 16 |
# File 'lib/davinci_pdex_test_kit/ext/inferno_core/request.rb', line 14 def response_headers=(headers_hash) headers.concat(headers_hash.map { |key, value| Header.new(name: key.to_s, value:, type: 'response') }) end |