Module: Ronnie::Request

Included in:
Client
Defined in:
lib/ronnie/request.rb

Instance Method Summary collapse

Instance Method Details

#post(method, options = {}) ⇒ Object



5
6
7
# File 'lib/ronnie/request.rb', line 5

def post(method, options={})
  request(method, options)
end

#request(method, options) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/ronnie/request.rb', line 9

def request(method, options)
  response = connect.post '/1/' do |request|        
    request.body = { method: method }.merge!(options)
  end

  response.body.result
end