class DTK::Client::Execute::CommandProcessor::RestCall
Public Class Methods
execute(rest_command)
click to toggle source
# File lib/execute/command_processor/rest_call.rb, line 22 def self.execute(rest_command) response = raw_execute(rest_command) if response.ok? response.data else raise Error.new(response,rest_command) end end
Private Class Methods
raw_execute(rest_command)
click to toggle source
# File lib/execute/command_processor/rest_call.rb, line 32 def self.raw_execute(rest_command) if rest_command.kind_of?(Command::RestCall::Post) post(rest_url(rest_command.path),rest_command.body) else raise ErrorUsage.new("Unexpected Rest Command type: #{rest_command.class}") end end