Module: VagrantPlugins::Openstack::RestUtils
- Defined in:
- lib/vagrant-openstack-provider/client/rest_utils.rb
Class Method Summary collapse
- .delete(env, url, headers = {}, &block) ⇒ Object
- .get(env, url, headers = {}, &block) ⇒ Object
- .post(env, url, payload, headers = {}, &block) ⇒ Object
Class Method Details
.delete(env, url, headers = {}, &block) ⇒ Object
18 19 20 21 22 |
# File 'lib/vagrant-openstack-provider/client/rest_utils.rb', line 18 def self.delete(env, url, headers = {}, &block) config = env[:machine].provider_config RestClient::Request.execute(method: :delete, url: url, headers: headers, timeout: config.http.read_timeout, open_timeout: config.http.open_timeout, &block) end |
.get(env, url, headers = {}, &block) ⇒ Object
6 7 8 9 10 |
# File 'lib/vagrant-openstack-provider/client/rest_utils.rb', line 6 def self.get(env, url, headers = {}, &block) config = env[:machine].provider_config RestClient::Request.execute(method: :get, url: url, headers: headers, timeout: config.http.read_timeout, open_timeout: config.http.open_timeout, &block) end |
.post(env, url, payload, headers = {}, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/vagrant-openstack-provider/client/rest_utils.rb', line 12 def self.post(env, url, payload, headers = {}, &block) config = env[:machine].provider_config RestClient::Request.execute(method: :post, url: url, payload: payload, headers: headers, timeout: config.http.read_timeout, open_timeout: config.http.open_timeout, &block) end |