Module: Restool::Service::RemoteConnector
- Defined in:
- lib/restool/service/remote_connector.rb
Class Method Summary collapse
-
.execute(remote_client, operation, path, params, headers, response_handler, representations, basic_auth) ⇒ Object
The RemoteConnector module makes the requests using the RemoteClient, calls the response_handler with the response, and finally executes the object traversal.
Class Method Details
.execute(remote_client, operation, path, params, headers, response_handler, representations, basic_auth) ⇒ Object
The RemoteConnector module makes the requests using the RemoteClient, calls the response_handler with the response, and finally executes the object traversal
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/restool/service/remote_connector.rb', line 10 def self.execute(remote_client, operation, path, params, headers, response_handler, representations, basic_auth) remote_response = remote_client.make_request(path, operation.method, params, headers, basic_auth) response = response_handler.call(remote_response.body, remote_response.code) return response if operation.response.nil? Restool::Traversal::Converter.convert(response, operation.response, representations) end |