Module: Soaspec::RestExchangeFactory
- Included in:
- RestHandler
- Defined in:
- lib/soaspec/exchange_handlers/rest_exchanger_factory.rb
Overview
Convenience methods for once off usage of a REST request
Instance Method Summary collapse
-
#delete(params = {}) ⇒ Exchange
Make REST Exchange with ‘delete’ method within this Handler context.
-
#get(params = {}) ⇒ Exchange
Make REST Exchange with ‘get’ method within this Handler context.
-
#patch(params) ⇒ Exchange
Make REST Exchange with ‘patch’ method within this Handler context Following are for the body of the request.
-
#post(params = {}) ⇒ Exchange
Make REST Exchange with ‘post’ method within this Handler context Following are for the body of the request.
-
#put(params = {}) ⇒ Exchange
Make REST Exchange with ‘put’ method within this Handler context Following are for the body of the request.
Instance Method Details
#delete(params = {}) ⇒ Exchange
Make REST Exchange with ‘delete’ method within this Handler context. If merely a string is passed it will be used as the URL appended to base_url (same as suburl). Otherwise a Hash is expected
71 72 73 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 71 def delete(params = {}) perform_exchange_with(:delete, params) end |
#get(params = {}) ⇒ Exchange
Make REST Exchange with ‘get’ method within this Handler context. If merely a string is passed it will be used as the URL appended to base_url (same as suburl). Otherwise a Hash is expected
59 60 61 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 59 def get(params = {}) perform_exchange_with(:get, params) end |
#patch(params) ⇒ Exchange
Make REST Exchange with ‘patch’ method within this Handler context Following are for the body of the request
32 33 34 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 32 def patch(params) perform_exchange_with(:patch, params) end |
#post(params = {}) ⇒ Exchange
Make REST Exchange with ‘post’ method within this Handler context Following are for the body of the request
17 18 19 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 17 def post(params = {}) perform_exchange_with(:post, params) end |
#put(params = {}) ⇒ Exchange
Make REST Exchange with ‘put’ method within this Handler context Following are for the body of the request
47 48 49 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 47 def put(params = {}) perform_exchange_with(:put, params) end |