Sha256: aa2be24a3e2a855f8483759ca1eb7749f4f51402850cea7120d8d9fef7657f7c
Contents?: true
Size: 1.03 KB
Versions: 8
Compression:
Stored size: 1.03 KB
Contents
require 'restclient' module VagrantPlugins module ConoHa module RestUtils 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 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 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 end end end
Version data entries
8 entries across 8 versions & 1 rubygems