Class: Linzer::Message::Adapter::Faraday::Response
- Inherits:
-
Generic::Response
- Object
- Abstract
- Generic::Response
- Linzer::Message::Adapter::Faraday::Response
- Defined in:
- lib/linzer/message/adapter/faraday/response.rb
Overview
Note:
Not loaded automatically to avoid making faraday a hard dependency. Require “linzer/faraday” to register this adapter.
Adapter for Faraday::Response objects from the faraday gem.
Extends the generic response adapter with faraday-specific derived component retrieval (e.g. @status) and header attachment.
Instance Method Summary collapse
-
#attach!(signature) ⇒ ::Faraday::Response
Attaches a signature to the underlying response headers.
Methods inherited from Generic::Response
Methods inherited from Abstract
#[], #attached_request?, #field?, #header, #initialize, #request?, #response?
Constructor Details
This class inherits a constructor from Linzer::Message::Adapter::Generic::Response
Instance Method Details
#attach!(signature) ⇒ ::Faraday::Response
Attaches a signature to the underlying response headers.
23 24 25 26 |
# File 'lib/linzer/message/adapter/faraday/response.rb', line 23 def attach!(signature) signature.to_h.each { |h, v| @operation.headers[h] = v } @operation end |