Sha256: 4abe584b2cf6a00b174f97cc780c501d270c6e14a163c49dbde30ef70aaf1ea4
Contents?: true
Size: 851 Bytes
Versions: 13
Compression:
Stored size: 851 Bytes
Contents
require 'restclient' module RestClient def self.ssl_settings { :verify_ssl => OpenSSL::SSL::VERIFY_PEER, :ssl_ca_file => File.join(File.dirname(__FILE__), 'cert') } end def self.get(url, headers={}, &block) Request.execute(ssl_settings.merge(:method => :get, :url => url, :headers => headers), &block) end def self.post(url, payload, headers={}, &block) Request.execute(ssl_settings.merge(:method => :post, :url => url, :payload => payload, :headers => headers), &block) end def self.put(url, payload, headers={}, &block) Request.execute(ssl_settings.merge(:method => :put, :url => url, :payload => payload, :headers => headers), &block) end def self.delete(url, headers={}, &block) Request.execute(ssl_settings.merge(:method => :delete, :url => url, :headers => headers), &block) end end
Version data entries
13 entries across 13 versions & 1 rubygems