Class: Bluzelle::Swarm::Request
- Inherits:
-
Object
- Object
- Bluzelle::Swarm::Request
- Defined in:
- lib/bluzelle/swarm/request.rb
Class Method Summary collapse
Class Method Details
.execute(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bluzelle/swarm/request.rb', line 9 def execute( = {}) resp = RestClient::Request.execute(()) rescue RestClient::ExceptionWithResponse => e case e.http_code when 404, 500 raise Error::ApiError, e.response.body else error(e) end else success(resp) end |