Module: Morpheus::Mixins::RequestHandling::ClassMethods

Defined in:
lib/morpheus/mixins/request_handling.rb

Instance Method Summary collapse

Instance Method Details

#delete(path, params = nil, metadata = {}, &block) ⇒ Object



29
30
31
32
33
# File 'lib/morpheus/mixins/request_handling.rb', line 29

def delete(path, params = nil,  = {}, &block)
  request = Request.enqueue(:delete, path, params)
  request.on_complete = block if block_given?
  response_from_request(request, )
end

#get(path, params = nil, metadata = {}, &block) ⇒ Object



11
12
13
14
15
# File 'lib/morpheus/mixins/request_handling.rb', line 11

def get(path, params = nil,  = {}, &block)
  request = Request.enqueue(:get, path, params)
  request.on_complete = block if block_given?
  response_from_request(request, )
end

#post(path, params = nil, metadata = {}, &block) ⇒ Object



17
18
19
20
21
# File 'lib/morpheus/mixins/request_handling.rb', line 17

def post(path, params = nil,  = {}, &block)
  request = Request.enqueue(:post, path, params)
  request.on_complete = block if block_given?
  response_from_request(request, )
end

#put(path, params = nil, metadata = {}, &block) ⇒ Object



23
24
25
26
27
# File 'lib/morpheus/mixins/request_handling.rb', line 23

def put(path, params = nil,  = {}, &block)
  request = Request.enqueue(:put, path, params)
  request.on_complete = block if block_given?
  response_from_request(request, )
end