Class: AWS::Core::RESTResponseParser
- Inherits:
-
Object
- Object
- AWS::Core::RESTResponseParser
- Defined in:
- lib/aws/core/rest_response_parser.rb
Overview
Given a hash of request options, a REST::RequestHandler can populate a Core::Http::Request object.
Instance Method Summary collapse
-
#extract_data(response) ⇒ Hash
Given a response object, this method extract and returns a hash of response data.
Instance Method Details
#extract_data(response) ⇒ Hash
Given a response object, this method extract and returns a hash of response data.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/aws/core/rest_response_parser.rb', line 31 def extract_data response # parse the response XML body data = @parser.parse(response.http_response.body) # extract headers and insert into response (@http[:response_headers] || {}).each_pair do |name,header_name| data[name] = response.http_response.headers[header_name] end data end |