Class: OpenTox::RestClientWrapper
- Inherits:
-
Object
- Object
- OpenTox::RestClientWrapper
- Defined in:
- lib/rest_client_wrapper.rb
Class Method Summary collapse
-
.delete(uri, headers = nil) ⇒ OpenTox::WrapperResult
performs a DELETE REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502).
-
.get(uri, headers = {}, waiting_task = nil, wait = true) ⇒ OpenTox::WrapperResult
performs a GET REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502) per default: waits for Task to finish and returns result URI of Task.
-
.post(uri, payload = nil, headers = {}, waiting_task = nil, wait = true) ⇒ OpenTox::WrapperResult
performs a POST REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502) per default: waits for Task to finish and returns result URI of Task.
-
.put(uri, payload = nil, headers = {}) ⇒ OpenTox::WrapperResult
performs a PUT REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502).
Class Method Details
.delete(uri, headers = nil) ⇒ OpenTox::WrapperResult
performs a DELETE REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502)
49 50 51 |
# File 'lib/rest_client_wrapper.rb', line 49 def self.delete(uri, headers=nil ) execute( "delete", uri, nil, headers) end |
.get(uri, headers = {}, waiting_task = nil, wait = true) ⇒ OpenTox::WrapperResult
performs a GET REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502) per default: waits for Task to finish and returns result URI of Task
17 18 19 |
# File 'lib/rest_client_wrapper.rb', line 17 def self.get(uri, headers={}, waiting_task=nil, wait=true ) execute( "get", uri, nil, headers, waiting_task, wait) end |
.post(uri, payload = nil, headers = {}, waiting_task = nil, wait = true) ⇒ OpenTox::WrapperResult
performs a POST REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502) per default: waits for Task to finish and returns result URI of Task
30 31 32 |
# File 'lib/rest_client_wrapper.rb', line 30 def self.post(uri, payload=nil, headers={}, waiting_task=nil, wait=true ) execute( "post", uri, payload, headers, waiting_task, wait ) end |
.put(uri, payload = nil, headers = {}) ⇒ OpenTox::WrapperResult
performs a PUT REST call raises OpenTox::Error if call fails (rescued in overwrite.rb -> halt 502)
40 41 42 |
# File 'lib/rest_client_wrapper.rb', line 40 def self.put(uri, payload=nil, headers={} ) execute( "put", uri, payload, headers ) end |