Module: Morpheus::Mixins::RequestHandling::ClassMethods
- Defined in:
- lib/morpheus/mixins/request_handling.rb
Instance Method Summary collapse
- #delete(path, params = nil, metadata = {}, &block) ⇒ Object
- #get(path, params = nil, metadata = {}, &block) ⇒ Object
- #post(path, params = nil, metadata = {}, &block) ⇒ Object
- #put(path, params = nil, metadata = {}, &block) ⇒ Object
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 |