Class: OpenTox::RestClientWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rest_client_wrapper.rb

Class Method Summary collapse

Class Method Details

.delete(uri, headers = nil) ⇒ Object



51
52
53
# File 'lib/rest_client_wrapper.rb', line 51

def self.delete(uri, headers=nil)
  execute( "delete", uri, headers, nil)
end

.get(uri, headers = nil, wait = true) ⇒ Object



39
40
41
# File 'lib/rest_client_wrapper.rb', line 39

def self.get(uri, headers=nil, wait=true)
  execute( "get", uri, headers, nil, wait)
end

.post(uri, headers, payload = nil, wait = true) ⇒ Object



43
44
45
# File 'lib/rest_client_wrapper.rb', line 43

def self.post(uri, headers, payload=nil, wait=true)
  execute( "post", uri, headers, payload, wait )
end

.put(uri, headers, payload = nil) ⇒ Object



47
48
49
# File 'lib/rest_client_wrapper.rb', line 47

def self.put(uri, headers, payload=nil )
  execute( "put", uri, headers, payload )
end

.raise_uri_error(error_msg, uri, headers = nil, payload = nil) ⇒ Object



55
56
57
# File 'lib/rest_client_wrapper.rb', line 55

def self.raise_uri_error(error_msg, uri, headers=nil, payload=nil)
  do_halt( "-", error_msg, uri, headers, payload )         
end