Class: Svelte::GenericOperation
- Inherits:
-
Object
- Object
- Svelte::GenericOperation
- Defined in:
- lib/svelte/generic_operation.rb
Overview
Class that handles the actual execution of dynamically generated operations Each created operation will eventually call this class in order to make the final HTTP request to the REST endpoint
Class Method Summary collapse
-
.call(verb:, path:, configuration:, parameters:, options:, headers: nil) ⇒ Object
Make an HTTP request to a REST resource.
Class Method Details
.call(verb:, path:, configuration:, parameters:, options:, headers: nil) ⇒ Object
Make an HTTP request to a REST resource
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/svelte/generic_operation.rb', line 17 def call(verb:, path:, configuration:, parameters:, options:, headers: nil) url = url_for(configuration: configuration, path: path, parameters: parameters) request_parameters = clean_parameters(path: path, parameters: parameters) request_headers = build_request_headers(configuration: configuration, options: , headers: headers) RestClient.call(verb: verb, url: url, params: request_parameters, headers: request_headers, options: ) end |