Module: RestClient

Defined in:
lib/restclient.rb

Class Method Summary collapse

Class Method Details

.delete(url, headers = {}, &block) ⇒ Object



22
23
24
25
# File 'lib/restclient.rb', line 22

def self.delete(url, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :delete, :url => url, :headers => headers, &block)
end

.get(url, headers = {}, &block) ⇒ Object



2
3
4
5
# File 'lib/restclient.rb', line 2

def self.get(url, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :get, :url => url, :headers => headers, &block)
end

.head(url, headers = {}, &block) ⇒ Object



27
28
29
30
# File 'lib/restclient.rb', line 27

def self.head(url, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :head, :url => url, :headers => headers, &block)
end

.options(url, headers = {}, &block) ⇒ Object



32
33
34
35
# File 'lib/restclient.rb', line 32

def self.options(url, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :options, :url => url, :headers => headers, &block)
end

.patch(url, payload, headers = {}, &block) ⇒ Object



12
13
14
15
# File 'lib/restclient.rb', line 12

def self.patch(url, payload, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :patch, :url => url, :payload => payload, :headers => headers, &block)
end

.post(url, payload, headers = {}, &block) ⇒ Object



7
8
9
10
# File 'lib/restclient.rb', line 7

def self.post(url, payload, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :post, :url => url, :payload => payload, :headers => headers, &block)
end

.put(url, payload, headers = {}, &block) ⇒ Object



17
18
19
20
# File 'lib/restclient.rb', line 17

def self.put(url, payload, headers={}, &block)
  headers['x-aspose-client'] = 'RubySDK/v1.0'
  Request.execute(:method => :put, :url => url, :payload => payload, :headers => headers, &block)
end