Class: WinRM::ResponseHandler
- Inherits:
-
Object
- Object
- WinRM::ResponseHandler
- Defined in:
- lib/winrm/http/response_handler.rb
Overview
Handles the raw WinRM HTTP response. Returns the body as an XML doc or raises the appropriate WinRM error if the response is an error.
Instance Method Summary collapse
-
#initialize(response_body, status_code) ⇒ ResponseHandler
constructor
A new instance of ResponseHandler.
-
#parse_to_xml ⇒ Object
Processes the response from the WinRM service and either returns an XML doc or raises an appropriate error.
Constructor Details
#initialize(response_body, status_code) ⇒ ResponseHandler
Returns a new instance of ResponseHandler.
24 25 26 27 |
# File 'lib/winrm/http/response_handler.rb', line 24 def initialize(response_body, status_code) @response_body = response_body @status_code = status_code end |
Instance Method Details
#parse_to_xml ⇒ Object
Processes the response from the WinRM service and either returns an XML doc or raises an appropriate error.
33 34 35 36 |
# File 'lib/winrm/http/response_handler.rb', line 33 def parse_to_xml raise_if_error response_xml end |