Method: HTTPAdapter#adapt_response
- Defined in:
- lib/httpadapter.rb
#adapt_response(response_obj) ⇒ Array
Converts an HTTP response object to a simple tuple.
99 100 101 102 103 104 105 106 107 |
# File 'lib/httpadapter.rb', line 99 def adapt_response(response_obj) if self.respond_to?(:convert_response_to_a) converted_response = self.convert_response_to_a(response_obj) else raise TypeError, 'Expected adapter to implement #convert_response_to_a.' end return HTTPAdapter.verified_response(converted_response) end |