Class: Restool::Service::RemoteClient
- Inherits:
-
Object
- Object
- Restool::Service::RemoteClient
- Defined in:
- lib/restool/service/remote_client.rb
Instance Method Summary collapse
-
#initialize(host, verify_ssl, timeout, opts) ⇒ RemoteClient
constructor
A new instance of RemoteClient.
- #make_request(path, method, request_params, headers, basic_auth) ⇒ Object
Constructor Details
#initialize(host, verify_ssl, timeout, opts) ⇒ RemoteClient
Returns a new instance of RemoteClient.
10 11 12 13 |
# File 'lib/restool/service/remote_client.rb', line 10 def initialize(host, verify_ssl, timeout, opts) @request_logger = Restool::RequestLogger.new(host, opts) @connection = build_connection(host, verify_ssl, timeout, opts) end |
Instance Method Details
#make_request(path, method, request_params, headers, basic_auth) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/restool/service/remote_client.rb', line 15 def make_request(path, method, request_params, headers, basic_auth) operation_request = RequestUtils.build_request(method, path, request_params, headers, basic_auth) @request_logger.log(operation_request) do @connection.request(operation_request.http_request) end end |