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
69 70 71 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 69 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
57 58 59 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 57 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
30 31 32 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 30 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
15 16 17 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 15 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
45 46 47 |
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 45 def put(params = {}) perform_exchange_with(:put, params) end |