Method: Soaspec::RestExchangeFactory#put

Defined in:
lib/soaspec/exchange_handlers/rest_exchanger_factory.rb

#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

Options Hash (params):

  • :name (String)

    Name to appear in traffic logs

  • :params (Hash)

    Extra parameters (E.g. headers)

  • :suburl (String)

    URL appended to base_url of class

  • :q (Hash)

    Query for REST

  • :body (Hash)

    Hash to be converted to JSON in request body

  • :payload (String)

    String to be passed directly in request body

  • :template_name (String)

    Path to file to be read via ERB and passed in request body

Returns:

  • (Exchange)

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



47
48
49
# File 'lib/soaspec/exchange_handlers/rest_exchanger_factory.rb', line 47

def put(params = {})
  perform_exchange_with(:put, params)
end