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

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. Otherwise a Hash is expected Following are for the body of the request

Parameters:

  • params (Hash, String) (defaults to: {})

    Exchange parameters. If String is used it will be for suburl

  • override_parameters (Hash)

    a customizable set of options

Returns:

  • (Exchange)

    Instance of Exchange class. Assertions are made by default on the response body



72
73
74
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 72

def delete(params = {})
  # This is a stub, used for indexing, source code below
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. Otherwise a Hash is expected Following are for the body of the request

Parameters:

  • params (Hash, String) (defaults to: {})

    Exchange parameters. If String is used it will be for suburl

  • override_parameters (Hash)

    a customizable set of options

Returns:

  • (Exchange)

    Instance of Exchange class. Assertions are made by default on the response body



57
58
59
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 57

def get(params = {})
  # This is a stub, used for indexing, source code below
end

#patch(params) ⇒ Exchange

Make REST Exchange with ‘patch’ method within this Handler context Following are for the body of the request

Parameters:

  • params (Hash, String)

    Exchange parameters. If String is used it will be for the request payload

  • override_parameters (Hash)

    a customizable set of options

Returns:

  • (Exchange)

    Instance of Exchange class. Assertions are made by default on the response body



28
29
30
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 28

def patch(params)
  # This is a stub, used for indexing, source code below
end

#post(params = {}) ⇒ Exchange

Make REST Exchange with ‘post’ method within this Handler context Following are for the body of the request

Parameters:

  • params (Hash, String) (defaults to: {})

    Exchange parameters. If String is used it will be for the request payload

  • override_parameters (Hash)

    a customizable set of options

Returns:

  • (Exchange)

    Instance of Exchange class. Assertions are made by default on the response body



14
15
16
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 14

def post(params = {})
  # This is a stub, used for indexing, source code below
end

#put(params = {}) ⇒ Exchange

Make REST Exchange with ‘put’ method within this Handler context Following are for the body of the request

Parameters:

  • params (Hash, String) (defaults to: {})

    Exchange parameters. If String is used it will be for the request payload

  • override_parameters (Hash)

    a customizable set of options

Returns:

  • (Exchange)

    Instance of Exchange class. Assertions are made by default on the response body



42
43
44
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 42

def put(params = {})
  # This is a stub, used for indexing, source code below
end